summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php')
-rwxr-xr-xtests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php30
1 files changed, 14 insertions, 16 deletions
diff --git a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
index 7ec220f0..cad00f1f 100755
--- a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
@@ -3,16 +3,15 @@
* Created on 25/04/2006
*/
-class DataTypeValidatorTestCase extends PradoGenericSeleniumTest
+class DataTypeValidatorTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->setSpeed(500);
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=DataTypeValidator", "");
- $this->verifyTextPresent("Data Type Validator Tests", "");
- $this->click("//input[@type='submit' and @value='submit!']", "");
-
+ $this->url("validators/index.php?page=DataTypeValidator");
+ $this->assertContains("Data Type Validator Tests", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='submit!']")->click();
+
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
@@ -20,31 +19,30 @@ class DataTypeValidatorTestCase extends PradoGenericSeleniumTest
$this->type("{$base}textbox1", "a");
$this->type("{$base}textbox2", "b");
$this->type("{$base}textbox3", "c");
- $this->click("//input[@type='submit' and @value='submit!']", "");
+ $this->byXPath("//input[@type='submit' and @value='submit!']")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
-
+
$this->type("{$base}textbox1", "12");
$this->type("{$base}textbox2", "12.5");
$this->type("{$base}textbox3", "2/10/2005");
- $this->clickAndWait("//input[@type='submit' and @value='submit!']", "");
-
+ $this->byXPath("//input[@type='submit' and @value='submit!']")->click();
+
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
-
+
$this->type("{$base}textbox1", "12.2");
$this->type("{$base}textbox2", "-12.5");
$this->type("{$base}textbox3", "2/13/2005");
- $this->click("//input[@type='submit' and @value='submit!']", "");
-
+ $this->byXPath("//input[@type='submit' and @value='submit!']")->click();
+
$this->assertVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
- $this->setSpeed(0);
}
-
-}
+
+}