summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/validators')
-rwxr-xr-xtests/FunctionalTests/validators/tests/ButtonTestCase.php26
-rwxr-xr-xtests/FunctionalTests/validators/tests/CheckBoxTestCase.php30
-rwxr-xr-xtests/FunctionalTests/validators/tests/CompareValidatorTestCase.php12
-rwxr-xr-xtests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php56
-rwxr-xr-xtests/FunctionalTests/validators/tests/CustomValidatorTestCase.php6
-rwxr-xr-xtests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php10
-rwxr-xr-xtests/FunctionalTests/validators/tests/DatePickerTestCase.php78
-rwxr-xr-xtests/FunctionalTests/validators/tests/ImageButtonTestCase.php26
-rwxr-xr-xtests/FunctionalTests/validators/tests/LinkButtonTestCase.php26
-rwxr-xr-xtests/FunctionalTests/validators/tests/ListControlTestCase.php28
-rwxr-xr-xtests/FunctionalTests/validators/tests/RangeValidatorTestCase.php154
-rwxr-xr-xtests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php30
-rwxr-xr-xtests/FunctionalTests/validators/tests/RequiredFieldTestCase.php46
-rwxr-xr-xtests/FunctionalTests/validators/tests/RequiredListTestCase.php28
-rwxr-xr-xtests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php16
15 files changed, 286 insertions, 286 deletions
diff --git a/tests/FunctionalTests/validators/tests/ButtonTestCase.php b/tests/FunctionalTests/validators/tests/ButtonTestCase.php
index 898c6ff3..90265156 100755
--- a/tests/FunctionalTests/validators/tests/ButtonTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ButtonTestCase.php
@@ -13,51 +13,51 @@ class ButtonTestCase extends PradoGenericSelenium2Test
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
+ $this->byId("ctl0_Content_ctl1")->click();
$this->assertVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->assertTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
+ $this->byId("ctl0_Content_ctl1")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button1 is clicked and valid');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
+ $this->byId("ctl0_Content_ctl3")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->assertTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
+ $this->byId("ctl0_Content_ctl3")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button2 is clicked and valid');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
+ $this->byId("ctl0_Content_ctl5")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->assertTextPresent('Button3 is clicked');
- $this->assertTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
+ $this->byId("ctl0_Content_ctl5")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}
diff --git a/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php b/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php
index ebcffd00..8e6e1583 100755
--- a/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php
+++ b/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php
@@ -13,53 +13,53 @@ class CheckBoxTestCase extends PradoGenericSelenium2Test
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
+ $this->byId("ctl0_Content_ctl1")->click();
$this->assertVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->assertTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->clickAndWait("ctl0_Content_ctl1");
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->byId("ctl0_Content_ctl1")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button1 is clicked and valid');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
+ $this->byId("ctl0_Content_ctl3")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->assertTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->clickAndWait("ctl0_Content_ctl3");
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->byId("ctl0_Content_ctl3")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button2 is clicked and valid');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
+ $this->byId("ctl0_Content_ctl5")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->assertTextPresent('Button3 is clicked');
- $this->assertTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
+ $this->byId("ctl0_Content_ctl5")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}
diff --git a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php
index 5c45f49a..bdc2e4a9 100755
--- a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php
@@ -8,26 +8,26 @@ class CompareValidatorTestCase extends PradoGenericSelenium2Test
$base = "ctl0_Content_";
$this->url("validators/index.php?page=CompareValidator");
- $this->assertTextPresent("Prado CompareValidator Tests", "");
+ $this->assertContains("Prado CompareValidator Tests", $this->source());
$this->type("{$base}text1", "qwe");
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->type("{$base}text2", "1234");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertVisible("{$base}validator1");
$this->type("{$base}text2", "qwe");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->type("{$base}text3", "12312");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertVisible("{$base}validator2");
$this->type("{$base}text3", "13/1/2005");
@@ -35,7 +35,7 @@ class CompareValidatorTestCase extends PradoGenericSelenium2Test
$this->type("{$base}text3", "12/1/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
diff --git a/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php b/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php
index d9981eb8..32e79a90 100755
--- a/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php
@@ -6,47 +6,47 @@ class ConditionalValidationTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=ConditionalValidation");
- $this->assertTextPresent("Conditional Validation (clientside + server side)", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertContains("Conditional Validation (clientside + server side)", $this->source());
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1", "testing");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1" ,"");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text1", "test");
$this->type("{$base}text2", "123");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
- $this->click("{$base}check1");
+ $this->byId("{$base}check1")->click();
$this->type("{$base}text1", "");
$this->type("{$base}text2", "");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
}
diff --git a/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php
index c7bb6f9c..ca48a453 100755
--- a/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php
@@ -7,10 +7,10 @@ class CustomValidatorTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=CustomValidator");
- $this->assertTextPresent("Prado CustomValidator Tests", "");
+ $this->assertContains("Prado CustomValidator Tests", $this->source());
$this->assertNotVisible("{$base}validator1");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "Prado");
@@ -22,7 +22,7 @@ class CustomValidatorTestCase extends PradoGenericSelenium2Test
$this->type("{$base}text1", "Prado");
$this->pause(250);
$this->assertNotVisible("{$base}validator1");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertNotVisible("{$base}validator1");
}
diff --git a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
index c70549d0..6da797f1 100755
--- a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
@@ -10,8 +10,8 @@ class DataTypeValidatorTestCase extends PradoGenericSelenium2Test
$this->setSpeed(500);
$base = "ctl0_Content_";
$this->url("validators/index.php?page=DataTypeValidator");
- $this->assertTextPresent("Data Type Validator Tests", "");
- $this->click("//input[@type='submit' and @value='submit!']", "");
+ $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");
@@ -20,7 +20,7 @@ class DataTypeValidatorTestCase extends PradoGenericSelenium2Test
$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");
@@ -29,7 +29,7 @@ class DataTypeValidatorTestCase extends PradoGenericSelenium2Test
$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");
@@ -38,7 +38,7 @@ class DataTypeValidatorTestCase extends PradoGenericSelenium2Test
$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");
diff --git a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
index 81c24aca..ab68a619 100755
--- a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
+++ b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
@@ -8,61 +8,61 @@ class DatePickerTestCase extends PradoGenericSelenium2Test
$year2=2013;
$base = "ctl0_Content_";
$this->url("validators/index.php?page=DatePicker");
- $this->assertTextPresent("Date Picker validation Test", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertNotVisible("{$base}validator8", "");
+ $this->assertContains("Date Picker validation Test", $this->source());
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
+ $this->assertNotVisible("{$base}validator4");
+ $this->assertNotVisible("{$base}validator5");
+ $this->assertNotVisible("{$base}validator6");
+ $this->assertNotVisible("{$base}validator8");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
//the range validator is visible because the date is a drop down list
//thus has default value != ""
- $this->assertVisible("{$base}validator4", "");
- $this->assertVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertVisible("{$base}validator8", "");
+ $this->assertVisible("{$base}validator4");
+ $this->assertVisible("{$base}validator5");
+ $this->assertNotVisible("{$base}validator6");
+ $this->assertVisible("{$base}validator8");
$this->type("{$base}picker1", "13/4/$year");
- $this->select("{$base}picker2_month", "label=9");
- $this->select("{$base}picker2_day", "label=10");
- $this->select("{$base}picker2_year", "label=$year");
+ $this->select("{$base}picker2_month", "9");
+ $this->select("{$base}picker2_day", "10");
+ $this->select("{$base}picker2_year", "$year");
$this->pause(250);
$this->type("{$base}picker3", "14/4/$year");
$this->pause(250);
$this->type("{$base}picker4", "7/4/$year");
- $this->select("{$base}picker5_day", "label=6");
- $this->select("{$base}picker5_month", "label=3");
- $this->select("{$base}picker5_year", "label=$year2");
- $this->select("{$base}picker6_month", "label=3");
- $this->select("{$base}picker6_year", "label=$year2");
- $this->select("{$base}picker6_day", "label=5");
+ $this->select("{$base}picker5_day", "6");
+ $this->select("{$base}picker5_month", "3");
+ $this->select("{$base}picker5_year", "$year2");
+ $this->select("{$base}picker6_month", "3");
+ $this->select("{$base}picker6_year", "$year2");
+ $this->select("{$base}picker6_day", "5");
+ $this->byId("{$base}submit1")->click();
+ $this->pause(500);
- $this->click("{$base}submit1");
-
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertVisible("{$base}validator6", "");
- $this->assertVisible("{$base}validator8", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
+ $this->assertNotVisible("{$base}validator4");
+ $this->assertNotVisible("{$base}validator5");
+ $this->assertVisible("{$base}validator6");
+ $this->assertVisible("{$base}validator8");
$this->type("{$base}picker1", "20/4/$year2");
$this->type("{$base}picker4", "29/4/$year");
- $this->select("{$base}picker6_day", "label=10");
+ $this->select("{$base}picker6_day", "10");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertNotVisible("{$base}validator8", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
+ $this->assertNotVisible("{$base}validator4");
+ $this->assertNotVisible("{$base}validator5");
+ $this->assertNotVisible("{$base}validator6");
+ $this->assertNotVisible("{$base}validator8");
}
}
diff --git a/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php b/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php
index ef086baa..800e36ff 100755
--- a/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php
@@ -13,51 +13,51 @@ class ImageButtonTestCase extends PradoGenericSelenium2Test
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
+ $this->byId("ctl0_Content_ctl1")->click();
$this->assertVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->assertTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
+ $this->byId("ctl0_Content_ctl1")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button1 is clicked and valid');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
+ $this->byId("ctl0_Content_ctl3")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->assertTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
+ $this->byId("ctl0_Content_ctl3")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button2 is clicked and valid');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
+ $this->byId("ctl0_Content_ctl5")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->assertTextPresent('Button3 is clicked');
- $this->assertTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
+ $this->byId("ctl0_Content_ctl5")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}
diff --git a/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php b/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php
index 66e2fc61..394556e9 100755
--- a/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php
+++ b/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php
@@ -12,51 +12,51 @@ class LinkButtonTestCase extends PradoGenericSelenium2Test
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
+ $this->byId("ctl0_Content_ctl1")->click();
$this->assertVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->assertTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
+ $this->byId("ctl0_Content_ctl1")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button1 is clicked and valid');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
+ $this->byId("ctl0_Content_ctl3")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->assertTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
+ $this->byId("ctl0_Content_ctl3")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button2 is clicked and valid');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
+ $this->byId("ctl0_Content_ctl5")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->assertTextPresent('Button3 is clicked');
- $this->assertTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
+ $this->byId("ctl0_Content_ctl5")->click();
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
- $this->assertTextPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}
diff --git a/tests/FunctionalTests/validators/tests/ListControlTestCase.php b/tests/FunctionalTests/validators/tests/ListControlTestCase.php
index a8aca64b..55e370c5 100755
--- a/tests/FunctionalTests/validators/tests/ListControlTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ListControlTestCase.php
@@ -9,19 +9,19 @@ class ListControlTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=ListControl");
- $this->assertTextPresent("List Control Required Field Validation Test", "");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
+ $this->assertContains("List Control Required Field Validation Test", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='Submit!']")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
$this->assertVisible("{$base}validator4");
- $this->click("//input[@id='{$base}list1_c1' and @value='Red']", "");
- $this->select("{$base}list2", "label=Red");
- $this->select("{$base}list3", "label=Blue");
- $this->click("{$base}list4_c3", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit!']", "");
+ $this->byXPath("//input[@id='{$base}list1_c1' and @value='Red']")->click();
+ $this->select("{$base}list2", "Red");
+ $this->select("{$base}list3", "Blue");
+ $this->byId("{$base}list4_c3")->click();
+ $this->byXPath("//input[@type='submit' and @value='Submit!']")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
@@ -29,13 +29,13 @@ class ListControlTestCase extends PradoGenericSelenium2Test
$this->assertNotVisible("{$base}validator4");
//invalid selector: Unable to locate an element with the xpath expression .//option[.='Don\'t select this one'] because of the following error: SyntaxError: Failed to execute 'evaluate' on 'Document': The string './/option[.='Don\'t select this one']' is not a valid XPath expression.
- $this->select("{$base}list3", "label=Dont select this one");
- $this->click("{$base}list4_c0");
- $this->select("{$base}list2", "label=--- Select a color ---");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
- $this->click("//input[@id='{$base}list1_c1' and @value='Red']", "");
- $this->click("//input[@id='{$base}list1_c0' and @value='Select a color below']", "");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
+ $this->select("{$base}list3", "Dont select this one");
+ $this->byId("{$base}list4_c0")->click();
+ $this->select("{$base}list2", "--- Select a color ---");
+ $this->byXPath("//input[@type='submit' and @value='Submit!']")->click();
+ $this->byXPath("//input[@id='{$base}list1_c1' and @value='Red']")->click();
+ $this->byXPath("//input[@id='{$base}list1_c0' and @value='Select a color below']")->click();
+ $this->byXPath("//input[@type='submit' and @value='Submit!']")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
diff --git a/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php
index 668260ad..485c6a24 100755
--- a/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php
@@ -7,39 +7,39 @@ class RangeValidatorTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=RangeValidatorInteger");
- $this->assertTextPresent("Prado RangeValidator Tests Integer", "");
+ $this->assertContains("Prado RangeValidator Tests Integer", $this->source());
//between 1 and 4
$this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "12");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "2");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
// >= 2
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text2", "1");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator2");
// <= 20
- $this->assertNotVisible("{$base}validator3", "");
+ $this->assertNotVisible("{$base}validator3");
$this->type("{$base}text3", "100");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator3");
$this->type("{$base}text3", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator3");
}
@@ -47,120 +47,120 @@ class RangeValidatorTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=RangeValidatorFloat");
- $this->assertTextPresent("Prado RangeValidator Tests Float", "");
+ $this->assertContains("Prado RangeValidator Tests Float", $this->source());
//between 1 and 4
$this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "12");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "2");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
// >= 2
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text2", "1");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator2");
// <= 20
- $this->assertNotVisible("{$base}validator3", "");
+ $this->assertNotVisible("{$base}validator3");
$this->type("{$base}text3", "100");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator3");
$this->type("{$base}text3", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator3");
}
function testDateRange()
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=RangeValidatorDate");
- $this->assertTextPresent("Prado RangeValidator Tests Date", "");
+ $this->assertContains("Prado RangeValidator Tests Date", $this->source());
//between 22/1/2005 and 3/2/2005
$this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "27/2/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "1/2/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
// >= 22/1/2005
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text2", "1/1/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->pause(250);
- $this->assertVisible("{$base}validator2", "");
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "1/4/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator2");
// <= 3/2/2005
- $this->assertNotVisible("{$base}validator3", "");
+ $this->assertNotVisible("{$base}validator3");
$this->type("{$base}text3", "4/5/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->pause(250);
- $this->assertVisible("{$base}validator3", "");
+ $this->assertVisible("{$base}validator3");
$this->type("{$base}text3", "1/2/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator3");
}
function testStringRange()
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=RangeValidatorString");
- $this->assertTextPresent("Prado RangeValidator Tests String", "");
+ $this->assertContains("Prado RangeValidator Tests String", $this->source());
//between 'd' and 'y'
$this->type("{$base}text1", "a");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "b");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "f");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
// >= 'd'
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text2", "a");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "g");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator2");
// <= 'y'
- $this->assertNotVisible("{$base}validator3", "");
+ $this->assertNotVisible("{$base}validator3");
$this->type("{$base}text3", "z");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator3");
$this->type("{$base}text3", "t");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator3");
}
}
diff --git a/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php
index b45ebcf3..ffa30126 100755
--- a/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php
@@ -7,26 +7,26 @@ class RegExpValidatorTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=RegularExpressionValidator");
- $this->assertTextPresent("Prado RegularExpressionValidator Tests", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertContains("Prado RegularExpressionValidator Tests", $this->source());
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1", "1");
$this->type("{$base}text2", "2");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text1", "asdasd");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "12345");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "wei@gmail.com");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
}
}
diff --git a/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php b/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php
index 4dd645b4..249f5ae8 100755
--- a/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php
+++ b/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php
@@ -6,49 +6,49 @@ class RequiredFieldTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=RequiredFieldValidator");
- $this->assertTextPresent("RequiredFieldValidator Tests");
+ $this->assertContains("RequiredFieldValidator Tests", $this->source());
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
- $this->click("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->type("{$base}text1", "testing");
- $this->click("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
- $this->click("{$base}submit2");
+ $this->byId("{$base}submit2")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
$this->assertVisible("{$base}validator4");
$this->type("{$base}text2", "testing2");
- $this->click("{$base}submit2");
+ $this->byId("{$base}submit2")->click();
$this->assertNotVisible("{$base}validator3");
- $this->click("{$base}submit3");
+ $this->byId("{$base}submit3")->click();
$this->assertVisible("{$base}summary3");
- $this->clickAndWait("{$base}submit4");
+ $this->byId("{$base}submit4")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
$this->assertNotVisible("{$base}validator4");
- $this->click("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator2");
- $this->click("{$base}check1");
- $this->click("{$base}submit2");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit2")->click();
$this->assertVisible("{$base}validator4");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
- $this->click("{$base}check2");
- $this->clickAndWait("{$base}submit2");
+ $this->byId("{$base}check2")->click();
+ $this->byId("{$base}submit2")->click();
$this->type("{$base}text1", "Hello");
- $this->click("{$base}check1");
- $this->clickAndWait("{$base}submit2");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit2")->click();
$this->assertNotVisible("{$base}validator5");
$this->assertNotVisible("{$base}validator6");
@@ -56,14 +56,14 @@ class RequiredFieldTestCase extends PradoGenericSelenium2Test
$this->assertNotVisible("{$base}validator8");
$this->type("{$base}text1");
$this->type("{$base}text2");
- $this->click("{$base}check1");
- $this->click("{$base}check2");
- $this->click("{$base}submit3");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}check2")->click();
+ $this->byId("{$base}submit3")->click();
$this->assertVisible("{$base}validator5");
$this->assertVisible("{$base}validator6");
$this->assertVisible("{$base}validator7");
$this->assertVisible("{$base}validator8");
- $this->clickAndWait("{$base}submit4");
+ $this->byId("{$base}submit4")->click();
$this->assertNotVisible("{$base}validator5");
$this->assertNotVisible("{$base}validator6");
$this->assertNotVisible("{$base}validator7");
@@ -74,9 +74,9 @@ class RequiredFieldTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=RequiredFieldValidator");
- $this->assertTextPresent("InitialValue Test");
+ $this->assertContains("InitialValue Test", $this->source());
$this->assertNotVisible("{$base}validator9");
- $this->click("{$base}submit5");
+ $this->byId("{$base}submit5")->click();
$this->pause(250);
$this->assertVisible("{$base}validator9");
$this->type("{$base}text5", "adasd");
diff --git a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php
index 6fbb1905..0de6815e 100755
--- a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php
+++ b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php
@@ -7,29 +7,29 @@ class RequiredListTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("validators/index.php?page=RequiredListValidator");
- $this->click("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
- $this->click("{$base}list1_c0");
- $this->addSelection("{$base}list2", "label=One");
- $this->addSelection("{$base}list2", "label=Two");
- $this->click("{$base}list3_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list1_c0")->click();
+ $this->addSelection("{$base}list2", "One");
+ $this->addSelection("{$base}list2", "Two");
+ $this->byId("{$base}list3_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
- $this->click("{$base}list1_c1");
- $this->click("{$base}list1_c2");
- $this->click("{$base}list1_c3");
- $this->addSelection("{$base}list2", "label=Two");
- $this->click("{$base}list1_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list1_c1")->click();
+ $this->byId("{$base}list1_c2")->click();
+ $this->byId("{$base}list1_c3")->click();
+ $this->addSelection("{$base}list2", "Two");
+ $this->byId("{$base}list1_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
- $this->click("{$base}list3_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list3_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->pause(200);
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
diff --git a/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php b/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php
index 0ee8c27c..d4c44a34 100755
--- a/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php
@@ -8,36 +8,36 @@ class ValidationSummaryTestCase extends PradoGenericSelenium2Test
$base = "ctl0_Content_";
$this->url("validators/index.php?page=ValidationSummary");
- $this->assertTextPresent("Validation Summary Test", "");
+ $this->assertContains("Validation Summary Test", $this->source());
//$this->assertText("{$base}summary1", "");
//$this->assertText("{$base}summary2", "");
- $this->click("//input[@type='submit' and @value='Create New Account']", "");
+ $this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
$this->assertVisible("{$base}summary1");
$this->assertNotVisible("{$base}summary2");
- $this->click("//input[@type='submit' and @value='Sign In']", "");
+ $this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
$this->assertNotVisible("{$base}summary1");
$this->assertVisible("{$base}summary2");
$this->type("{$base}Username", "qwe");
$this->type("{$base}Password", "ewwq");
- $this->click("//input[@type='submit' and @value='Sign In']", "");
+ $this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
$this->assertNotVisible("{$base}summary1");
$this->assertVisible("{$base}summary2");
- /*$this->clickAndWait("//input[@type='submit' and @value='Create New Account']", "");
+ /*$this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
$this->type("{$base}UserID", "123");
$this->type("{$base}Pass", "123");
- $this->clickAndWait("//input[@type='submit' and @value='Sign In']", "");
+ $this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
//$this->assertText("{$base}summary1", "");
//$this->assertText("{$base}summary2", "");
- $this->clickAndWait("//input[@type='submit' and @value='Create New Account']", "");
+ $this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
//$this->assertText("{$base}summary1", "");
//$this->assertText("{$base}summary2", "");
$this->type("{$base}Password", "");
- $this->click("//input[@type='submit' and @value='Create New Account']", "");
+ $this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
$this->assertVisible("{$base}summary1");
$this->assertNotVisible("{$base}summary2");