diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-02-28 10:39:25 +0100 |
---|---|---|
committer | David <ottodavid@gmx.net> | 2014-08-21 17:28:52 +0200 |
commit | 32dfd8233520261483bdf30f23425e3b50f05d17 (patch) | |
tree | 3e0287adbe64f07e4c04615c8f26a3b9db397b18 /tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php | |
parent | 3db08b4d991c02870d04f7198d65fd926805709c (diff) |
Ported all tests from Selenium1 (RC) to Selenium2 (WebDriver) using a compatibility layer
(cherry picked from commit 82774aa0a41562a325f31c901584ec01c8238573)
Conflicts:
tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
tests/FunctionalTests/tickets/tests/Ticket769TestCase.php
tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
Diffstat (limited to 'tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php')
-rwxr-xr-x | tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php index a3464702..0f512d2c 100755 --- a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php @@ -1,10 +1,10 @@ <?php -class QuickstartTextBoxTestCase extends PradoGenericSeleniumTest +class QuickstartTextBoxTestCase extends PradoGenericSelenium2Test { function test () { - $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTextBox.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TTextBox.Home&notheme=true&lang=en"); $this->verifyTitle("PRADO QuickStart Sample", ""); @@ -29,27 +29,27 @@ class QuickstartTextBoxTestCase extends PradoGenericSeleniumTest $this->verifyAttribute("ctl0\$body\$ctl5@readonly","regexp:true|readonly"); // auto postback textbox, CausesValidation=false - $this->verifyValue("ctl0\$body\$ctl6", "change me"); - $this->typeAndWait("ctl0\$body\$ctl6", "change mes"); - $this->verifyValue("ctl0\$body\$ctl6", "text changed"); + $this->assertValue("ctl0\$body\$ctl6", "change me"); + $this->type("ctl0\$body\$ctl6", "change mes"); + $this->assertValue("ctl0\$body\$ctl6", "text changed"); // auto postback textbox, CausesValidation=true - $this->verifyNotVisible('ctl0_body_ctl7'); + $this->assertNotVisible('ctl0_body_ctl7'); $this->type("ctl0\$body\$TextBox3", "test"); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl7'); - $this->typeAndWait("ctl0\$body\$TextBox3", "non test"); - $this->verifyNotVisible('ctl0_body_ctl7'); + $this->assertVisible('ctl0_body_ctl7'); + $this->type("ctl0\$body\$TextBox3", "non test"); + $this->assertNotVisible('ctl0_body_ctl7'); // submitting textbox with a button $this->type("ctl0\$body\$TextBox1", "texttext"); $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyValue("ctl0\$body\$TextBox1", "You just entered 'texttext'."); + $this->assertValue("ctl0\$body\$TextBox1", "You just entered 'texttext'."); // SafeText - $this->verifyText("ctl0_body_Output","test"); - $this->typeAndWait("ctl0\$body\$TextBox2","<a href=javascript:xxx>malicious code</a>"); - $this->verifyText("ctl0_body_Output","malicious code"); + $this->assertText("ctl0_body_Output","test"); + $this->type("ctl0\$body\$TextBox2","<a href=javascript:xxx>malicious code</a>"); + $this->assertText("ctl0_body_Output","malicious code"); // password $this->verifyAttribute("ctl0\$body\$ctl9@type","password"); @@ -71,21 +71,21 @@ End of message $this->verifyAttribute("ctl0\$body\$ctl13@wrap","off"); // auto postback textbox - $this->verifyValue("ctl0\$body\$ctl14", "change me"); - $this->typeAndWait("ctl0\$body\$ctl14", "change mes"); - $this->verifyValue("ctl0\$body\$ctl14", "text changed"); - $this->verifyValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox."); - $this->verifyValue("ctl0\$body\$ctl11", "This is a multiline text box. + $this->assertValue("ctl0\$body\$ctl14", "change me"); + $this->type("ctl0\$body\$ctl14", "change mes"); + $this->assertValue("ctl0\$body\$ctl14", "text changed"); + $this->assertValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox."); + $this->assertValue("ctl0\$body\$ctl11", "This is a multiline text box. In HTML, it is displayed as a textarea. End of message "); // textbox associated with a validator - $this->verifyNotVisible('ctl0_body_ctl15'); + $this->assertNotVisible('ctl0_body_ctl15'); $this->type("ctl0\$body\$MultiTextBox3", "demo"); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl15'); - $this->typeAndWait("ctl0\$body\$MultiTextBox3", "non demo"); - $this->verifyNotVisible('ctl0_body_ctl15'); + $this->assertVisible('ctl0_body_ctl15'); + $this->type("ctl0\$body\$MultiTextBox3", "non demo"); + $this->assertNotVisible('ctl0_body_ctl15'); } } |