summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php2
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php20
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php30
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php6
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php36
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php10
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php8
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php4
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php6
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php4
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php16
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php16
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php8
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php16
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php36
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php16
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CalculatorTestCase.php6
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php57
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php8
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php6
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php6
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php4
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php10
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/PopulateListTestCase.php6
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php10
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php24
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php2
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php2
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php4
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php2
30 files changed, 194 insertions, 187 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
index a98c14be..acbdbb2a 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
@@ -6,7 +6,7 @@ class ActiveButtonTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveButtonTest");
- $this->assertTextPresent("TActiveButton Functional Test");
+ $this->assertContains("TActiveButton Functional Test", $this->source());
$this->assertText("{$base}label1", "Label 1");
$this->clickOnElement("{$base}button2");
$this->pause(800);
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
index e1e0ba4b..c032c084 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
@@ -6,38 +6,38 @@ class ActiveCheckBoxListTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=TActiveCheckBoxListTest");
- $this->assertTextPresent("TActiveCheckBoxList Test Case");
+ $this->assertContains("TActiveCheckBoxList Test Case", $this->source());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertCheckBoxes(array(1,2,3));
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertCheckBoxes(array());
- $this->click("{$base}button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertCheckBoxes(array(0));
- $this->click("{$base}button4");
+ $this->byId("{$base}button4")->click();
$this->pause(800);
$this->assertCheckBoxes(array(4));
- $this->click("{$base}button5");
+ $this->byId("{$base}button5")->click();
$this->pause(800);
$this->assertCheckBoxes(array(1,4));
- $this->click("{$base}list1_c2");
+ $this->byId("{$base}list1_c2")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Selection: value 2, value 3, value 5");
- $this->click("{$base}list1_c2");
+ $this->byId("{$base}list1_c2")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Selection: value 2, value 5");
@@ -49,9 +49,9 @@ class ActiveCheckBoxListTestCase extends PradoGenericSelenium2Test
for($i = 0; $i < $total; $i++)
{
if(in_array($i, $checks))
- $this->assertChecked("{$base}list1_c{$i}");
+ $this->assertTrue($this->byId("{$base}list1_c{$i}")->selected());
else
- $this->assertNotChecked("{$base}list1_c{$i}");
+ $this->assertFalse($this->byId("{$base}list1_c{$i}")->selected());
}
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
index beedebc7..782b35be 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
@@ -6,53 +6,53 @@ class ActiveCheckBoxTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveCheckBoxTest");
- $this->assertTextPresent("Active CheckBox Test");
+ $this->assertContains("Active CheckBox Test", $this->source());
$this->assertText("{$base}checkbox1_label", "CheckBox 1");
$this->assertText("{$base}checkbox2_label", "CheckBox 2");
$this->assertText("{$base}label1", 'Label 1');
- $this->click("{$base}change_text1");
+ $this->byId("{$base}change_text1")->click();
$this->pause(800);
$this->assertText("{$base}checkbox1_label", 'Hello CheckBox 1');
- $this->click("{$base}change_text2");
+ $this->byId("{$base}change_text2")->click();
$this->pause(800);
$this->assertText("{$base}checkbox2_label", 'CheckBox 2 World');
//check box 1
- $this->click("{$base}change_checked1");
+ $this->byId("{$base}change_checked1")->click();
$this->pause(800);
- $this->assertChecked("{$base}checkbox1");
+ $this->assertTrue($this->byId("{$base}checkbox1")->selected());
- $this->click("{$base}change_checked1");
+ $this->byId("{$base}change_checked1")->click();
$this->pause(800);
- $this->assertNotChecked("{$base}checkbox1");
+ $this->assertFalse($this->byId("{$base}checkbox1")->selected());
//check box 2
- $this->click("{$base}change_checked2");
+ $this->byId("{$base}change_checked2")->click();
$this->pause(800);
- $this->assertChecked("{$base}checkbox2");
+ $this->assertTrue($this->byId("{$base}checkbox2")->selected());
- $this->click("{$base}change_checked2");
+ $this->byId("{$base}change_checked2")->click();
$this->pause(800);
- $this->assertNotChecked("{$base}checkbox2");
+ $this->assertFalse($this->byId("{$base}checkbox2")->selected());
//click checkbox 1
- $this->click("{$base}checkbox1");
+ $this->byId("{$base}checkbox1")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Checked");
- $this->click("{$base}checkbox1");
+ $this->byId("{$base}checkbox1")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Not Checked");
//click checkbox 2
- $this->click("{$base}checkbox2");
+ $this->byId("{$base}checkbox2")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Label 1:CheckBox 2 World Checked");
- $this->click("{$base}checkbox2");
+ $this->byId("{$base}checkbox2")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Label 1:CheckBox 2 World Not Checked");
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php
index d5c8b4f0..c41988cc 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php
@@ -6,11 +6,11 @@ class ActiveControlExpressionTagTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url('active-controls/index.php?page=ActiveControlExpressionTag');
- $this->assertTextPresent('Active Control With Expression Tag Test');
- $this->assertTextNotPresent('Text box content:');
+ $this->assertContains('Active Control With Expression Tag Test', $this->source());
+ $this->assertNotContains('Text box content:', $this->source());
$this->type("{$base}textbox1", 'Hello world');
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("repeats", 'result - 1 result - two');
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
index 0d6e2203..570a6717 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
@@ -5,45 +5,45 @@ class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveDatePicker");
- $this->assertTextPresent("TActiveDatePicker test");
+ $this->assertContains("TActiveDatePicker test", $this->source());
$this->assertText("{$base}status", "");
$this->assertValue("{$base}datepicker", date('m-d-Y'));
- $this->click("{$base}increaseButton");
+ $this->byId("{$base}increaseButton")->click();
$this->pause(800);
$this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 1 day')));
$this->assertText("{$base}status", date('m-d-Y', strtotime('+ 1 day')));
- $this->click("{$base}increaseButton");
+ $this->byId("{$base}increaseButton")->click();
$this->pause(800);
$this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 2 day')));
$this->assertText("{$base}status", date('m-d-Y', strtotime('+ 2 day')));
- $this->click("{$base}todayButton");
+ $this->byId("{$base}todayButton")->click();
$this->pause(800);
$this->assertValue("{$base}datepicker", date('m-d-Y'));
$this->assertText("{$base}status", date('m-d-Y'));
- $this->click("{$base}decreaseButton");
+ $this->byId("{$base}decreaseButton")->click();
$this->pause(800);
$this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('- 1 day')));
$this->assertText("{$base}status", date('m-d-Y', strtotime('- 1 day')));
- $this->click("{$base}datepicker");
+ $this->byId("{$base}datepicker")->click();
$this->pause(800);
- $this->click("css=input.todayButton");
+ $this->byCssSelector("input.todayButton")->click();
$this->pause(800);
$this->assertValue("{$base}datepicker", date('m-d-Y'));
$this->assertText("{$base}status", date('m-d-Y'));
- $this->click("css=input.nextMonthButton");
+ $this->byCssSelector("input.nextMonthButton")->click();
$this->pause(800);
$this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 1 month')));
$this->assertText("{$base}status", date('m-d-Y', strtotime('+1 month')));
- $this->click("{$base}toggleButton");
+ $this->byId("{$base}toggleButton")->click();
$this->pause(2000);
- $this->click("{$base}todayButton");
+ $this->byId("{$base}todayButton")->click();
$this->pause(800);
$this->assertSelected("{$base}datepicker_month", date('m'));
$this->assertText("{$base}status", date('m-d-Y'));
- $this->click("{$base}increaseButton");
+ $this->byId("{$base}increaseButton")->click();
$this->pause(800);
$dateToCheck=strtotime('+ 1 day');
$this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
@@ -51,7 +51,7 @@ class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
$this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
$this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
- $this->click("{$base}increaseButton");
+ $this->byId("{$base}increaseButton")->click();
$this->pause(800);
$dateToCheck=strtotime('+ 2 day');
$this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
@@ -59,7 +59,7 @@ class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
$this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
$this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
- $this->click("{$base}todayButton");
+ $this->byId("{$base}todayButton")->click();
$this->pause(800);
$dateToCheck=time();
$this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
@@ -67,7 +67,7 @@ class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
$this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
$this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
- $this->click("{$base}decreaseButton");
+ $this->byId("{$base}decreaseButton")->click();
$this->pause(800);
$dateToCheck=strtotime('- 1 day');
$this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
@@ -75,9 +75,9 @@ class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
$this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
$this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
- $this->click("{$base}datepickerbutton");
+ $this->byId("{$base}datepickerbutton")->click();
$this->pause(800);
- $this->click("css=input.todayButton");
+ $this->byCssSelector("input.todayButton")->click();
$this->pause(800);
$dateToCheck=time();
$this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
@@ -85,7 +85,7 @@ class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
$this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
$this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
- $this->click("css=input.nextMonthButton");
+ $this->byCssSelector("input.nextMonthButton")->click();
$this->pause(800);
$dateToCheck=strtotime('+ 1 month');
$this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
@@ -93,7 +93,7 @@ class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
$this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
$this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
- $this->click('ctl0_ctl1');
+ $this->byId('ctl0_ctl1')->click();
$this->pause(800);
$this->assertText("{$base}status2", "");
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
index f3bc8dc8..cb8c953f 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
@@ -6,19 +6,19 @@ class ActiveDropDownListTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveDropDownList");
- $this->assertTextPresent('Active Drop Down List Test Case');
+ $this->assertContains('Active Drop Down List Test Case', $this->source());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertSelected("{$base}list1", "item 4");
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertSelectedValue("{$base}list1", 'value 1');
- $this->click("{$base}button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertSelected("{$base}list1", "item 2");
@@ -36,7 +36,7 @@ class ActiveDropDownListTestCase extends PradoGenericSelenium2Test
$this->pause(800);
$this->assertText("{$base}label2", "Selection 2: value 3 - item 5");
- $this->click("{$base}button4");
+ $this->byId("{$base}button4")->click();
$this->pause(800);
$this->assertSelected("{$base}list1", 'item 3');
$this->pause(300);
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
index 2aedee05..d4b82068 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
@@ -9,14 +9,14 @@ class ActiveHiddenFieldTestCase extends PradoGenericSelenium2Test
$fieldEmpty = 'No longer empty';
$fieldUsed = 'My value';
- $this->assertTextPresent('Value of current hidden field');
- $this->click("{$base}Button1");
+ $this->assertContains('Value of current hidden field', $this->source());
+ $this->byId("{$base}Button1")->click();
$this->pause(800);
$this->assertText("{$base}ResponseLabel", $fieldEmpty);
- $this->click("{$base}Button2");
+ $this->byId("{$base}Button2")->click();
$this->pause(800);
$this->assertText("{$base}ResponseLabel", $fieldUsed);
- $this->click("{$base}Button3");
+ $this->byId("{$base}Button3")->click();
$this->pause(800);
$this->assertText("{$base}ResponseLabel", $fieldEmpty.'|'.$fieldUsed);
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php
index 47a90851..6329d826 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php
@@ -6,11 +6,11 @@ class ActiveHyperLinkTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveHyperLinkTest");
- $this->assertTextPresent("Active HyperLink Test Case");
+ $this->assertContains("Active HyperLink Test Case", $this->source());
$this->assertText("{$base}link1", "Link 1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("{$base}link1", "Pradosoft.com");
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php
index 0d9f219d..0ef2e082 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php
@@ -6,11 +6,11 @@ class ActiveImageButtonTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveImageButtonTest");
- $this->assertTextPresent("TActiveImageButton Functional Test");
+ $this->assertContains("TActiveImageButton Functional Test", $this->source());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}image1");
+ $this->byId("{$base}image1")->click();
$this->pause(800);
//unable to determine mouse position
- $this->assertTextPresent("regexp:Image clicked at x=\d+, y=\d+");
+ $this->assertRegExp('/Image clicked at x=\d+, y=\d+/', $this->source());
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
index 3e67b516..1f7c40ea 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
@@ -6,9 +6,9 @@ class ActiveLinkButtonTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveLinkButtonTest");
- $this->assertTextPresent("TActiveLinkButton Functional Test");
+ $this->assertContains("TActiveLinkButton Functional Test", $this->source());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Button 1 was clicked using callback!");
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php
index 31b80bff..be2bf174 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php
@@ -5,35 +5,35 @@ class ActiveListBoxMasterTestCase extends PradoGenericSelenium2Test
function test()
{
$this->url("active-controls/index.php?page=ActiveListBoxMasterTest");
- $this->assertTextPresent('Active List Box Functional Test');
+ $this->assertContains('Active List Box Functional Test', $this->source());
$base = 'ctl0_body_';
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->click("{$base}button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1'));
- $this->click("{$base}button4");
+ $this->byId("{$base}button4")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5'));
- $this->click("{$base}button5");
+ $this->byId("{$base}button5")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5'));
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertNotSomethingSelected("{$base}list1");
- $this->click("{$base}button6");
+ $this->byId("{$base}button6")->click();
$this->pause(800);
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
index 8818f78e..1830f5ab 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
@@ -6,33 +6,33 @@ class ActiveListBoxTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveListBoxTest");
- $this->assertTextPresent('Active List Box Functional Test');
+ $this->assertContains('Active List Box Functional Test', $this->source());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->click("{$base}button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1'));
- $this->click("{$base}button4");
+ $this->byId("{$base}button4")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5'));
- $this->click("{$base}button5");
+ $this->byId("{$base}button5")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5'));
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertNotSomethingSelected("{$base}list1");
- $this->click("{$base}button6");
+ $this->byId("{$base}button6")->click();
$this->pause(800);
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
diff --git a/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php b/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
index 528b542c..73ab3ad0 100755
--- a/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
@@ -6,10 +6,10 @@ class ActivePanelTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActivePanelTest");
- $this->assertTextPresent("Active Panel replacement tests");
- $this->assertTextNotPresent('Something lalala');
- $this->click("div1");
+ $this->assertContains("Active Panel replacement tests", $this->source());
+ $this->assertNotContains('Something lalala', $this->source());
+ $this->byId("div1")->click();
$this->pause(800);
- $this->assertTextPresent("Something lalala");
+ $this->assertContains("Something lalala", $this->source());
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
index 597567a0..82408732 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
@@ -6,28 +6,28 @@ class ActiveRadioButtonListTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveRadioButtonListTest");
- $this->assertTextPresent("TActiveRadioButtonList Test Case");
+ $this->assertContains("TActiveRadioButtonList Test Case", $this->source());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertCheckBoxes(array(0));
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertCheckBoxes(array());
- $this->click("{$base}button4");
+ $this->byId("{$base}button4")->click();
$this->pause(800);
$this->assertCheckBoxes(array(4));
- $this->click("{$base}list1_c2");
+ $this->byId("{$base}list1_c2")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Selection: value 3");
- $this->click("{$base}list1_c3");
+ $this->byId("{$base}list1_c3")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Selection: value 4");
@@ -39,9 +39,9 @@ class ActiveRadioButtonListTestCase extends PradoGenericSelenium2Test
for($i = 0; $i < $total; $i++)
{
if(in_array($i, $checks))
- $this->assertChecked("{$base}list1_c{$i}");
+ $this->assertTrue($this->byId("{$base}list1_c{$i}")->selected());
else
- $this->assertNotChecked("{$base}list1_c{$i}");
+ $this->assertFalse($this->byId("{$base}list1_c{$i}")->selected());
}
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
index 04837ef4..7606e46b 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
@@ -6,47 +6,47 @@ class ActiveRadioButtonTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveRadioButtonTest");
- $this->assertTextPresent("Active Radio Button Test");
+ $this->assertContains("Active Radio Button Test", $this->source());
$this->assertText("{$base}label1", 'Label 1');
- $this->assertNotChecked("{$base}radio1");
- $this->assertNotChecked("{$base}radio2");
- $this->assertNotChecked("{$base}radio3");
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertFalse($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
$this->assertText("{$base}radio1_label", 'Radio Button 1');
$this->assertText("{$base}radio2_label", 'Radio Button 2');
$this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click("{$base}change_text1");
+ $this->byId("{$base}change_text1")->click();
$this->pause(800);
$this->assertText("{$base}radio1_label", 'Hello Radio Button 1');
$this->assertText("{$base}radio2_label", 'Radio Button 2');
$this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click("{$base}change_text2");
+ $this->byId("{$base}change_text2")->click();
$this->pause(800);
$this->assertText("{$base}radio1_label", 'Hello Radio Button 1');
$this->assertText("{$base}radio2_label", 'Radio Button 2 World');
$this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click("{$base}change_radio1");
+ $this->byId("{$base}change_radio1")->click();
$this->pause(800);
- $this->assertChecked("{$base}radio1");
- $this->assertNotChecked("{$base}radio2");
- $this->assertNotChecked("{$base}radio3");
+ $this->assertTrue($this->byId("{$base}radio1")->selected());
+ $this->assertFalse($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
- $this->click("{$base}change_radio2");
+ $this->byId("{$base}change_radio2")->click();
$this->pause(800);
- $this->assertNotChecked("{$base}radio1");
- $this->assertChecked("{$base}radio2");
- $this->assertNotChecked("{$base}radio3");
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertTrue($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
- $this->click("{$base}radio3");
+ $this->byId("{$base}radio3")->click();
$this->pause(800);
- $this->assertNotChecked("{$base}radio1");
- $this->assertChecked("{$base}radio2");
- $this->assertChecked("{$base}radio3");
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertTrue($this->byId("{$base}radio2")->selected());
+ $this->assertTrue($this->byId("{$base}radio3")->selected());
$this->assertText("{$base}label1", 'Label 1:Radio Button 3 Checked');
diff --git a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
index f6dfc22b..058aae01 100755
--- a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
@@ -6,37 +6,37 @@ class AutoCompleteTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=AutoCompleteTest");
- $this->assertTextPresent("TAutoComplete Test");
+ $this->assertContains("TAutoComplete Test", $this->source());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}textbox3");
+ $this->byId("{$base}textbox3")->click();
$this->keys('a');
$this->pause(500);
- $this->assertTextPresent('Andorra');
+ $this->assertContains('Andorra', $this->source());
$this->assertText("{$base}label1", "suggestion for a");
$this->keys('u');
$this->pause(500);
- $this->assertTextPresent('Australia');
+ $this->assertContains('Australia', $this->source());
$this->assertText("{$base}label1", "suggestion for au");
- $this->click("css=#{$base}textbox3_result ul li");
+ $this->byCssSelector("#{$base}textbox3_result ul li")->click();
$this->pause(500);
$this->assertText("{$base}label1", "Label 1: Austria");
- $this->click("{$base}textbox2");
+ $this->byId("{$base}textbox2")->click();
$this->keys('cu');
$this->pause(500);
- $this->click("css=#{$base}textbox2_result ul li");
+ $this->byCssSelector("#{$base}textbox2_result ul li")->click();
$this->pause(500);
$this->assertText("{$base}label1", "Label 1: Cuba");
$this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::END);
$this->keys(',me');
$this->pause(500);
- $this->click("css=#{$base}textbox2_result ul li");
+ $this->byCssSelector("#{$base}textbox2_result ul li")->click();
$this->pause(500);
$this->assertText("{$base}label1", "Label 1: Cuba,Mexico");
}
diff --git a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
index 28cbb870..9bef7d00 100755
--- a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
@@ -6,16 +6,16 @@ class CalculatorTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=Calculator");
- $this->assertTextPresent("Callback Enabled Calculator");
+ $this->assertContains("Callback Enabled Calculator", $this->source());
$this->assertNotVisible("{$base}summary");
- $this->click("{$base}sum");
+ $this->byId("{$base}sum")->click();
$this->assertVisible("{$base}summary");
$this->type("{$base}a", "2");
$this->type("{$base}b", "5");
- $this->click("{$base}sum");
+ $this->byId("{$base}sum")->click();
$this->pause(500);
$this->assertNotVisible("{$base}summary");
diff --git a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
index 75de3419..25dabe24 100755
--- a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
@@ -6,53 +6,60 @@ class CallbackAdapterTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ControlAdapterTest");
- $this->assertTextPresent('Control Adapter - State Tracking Tests');
+ $this->assertContains('Control Adapter - State Tracking Tests', $this->source());
- $this->click("{$base}button2");
- $this->assertAlert('ok');
+ $this->byId("{$base}button2")->click();
+ $this->assertEquals('ok', $this->alertText());
+ $this->acceptAlert();
- $this->click("{$base}test6");
+ $this->byId("{$base}test6")->click();
$this->pause(800);
- $this->click("{$base}test7");
+ $this->byId("{$base}test7")->click();
$this->pause(800);
- $this->click("{$base}test8");
+ $this->byId("{$base}test8")->click();
$this->pause(800);
- $this->click("{$base}test9");
+ $this->byId("{$base}test9")->click();
$this->pause(800);
- $this->click("{$base}button1");
- $this->assertAlert('haha!');
-
- $this->click("{$base}button2");
- $this->assertAlert('ok');
- $this->assertAlert('baz!');
+ $this->byId("{$base}button1")->click();
+ $this->assertEquals('haha!', $this->alertText());
+ $this->acceptAlert();
+ $this->byId("{$base}button2")->click();
+ $this->assertEquals('ok', $this->alertText());
+ $this->acceptAlert();
+ $this->assertEquals('baz!', $this->alertText());
+ $this->acceptAlert();
}
/*
function testIE()
{
$this->url("active-controls/index.php?page=ControlAdapterTest");
- $this->assertTextPresent('Control Adapter - State Tracking Tests');
+ $this->assertContains('Control Adapter - State Tracking Tests', $this->source());
- $this->click("{$base}button2");
- $this->assertAlert('ok');
+ $this->byId("{$base}button2")->click();
+ $this->assertEquals('ok', $this->alertText());
+ $this->acceptAlert();
- $this->click('test6');
+ $this->byId('test6')->click();
$this->pause(800);
- $this->click('test7');
+ $this->byId('test7')->click();
$this->pause(800);
- $this->click('test8');
+ $this->byId('test8')->click();
$this->pause(800);
- $this->click('test9');
+ $this->byId('test9')->click();
$this->pause(800);
- $this->click("{$base}button1");
- $this->assertAlert('haha!');
+ $this->byId("{$base}button1")->click();
+ $this->assertEquals('haha!', $this->alertText());
+ $this->acceptAlert();
//IE alerts in diffrent order
- $this->click("{$base}button2");
- $this->assertAlert('baz!');
- $this->assertAlert('ok');
+ $this->byId("{$base}button2")->click();
+ $this->assertEquals('baz!', $this->alertText());
+ $this->acceptAlert();
+ $this->assertEquals('ok', $this->alertText());
+ $this->acceptAlert();
}
*/
}
diff --git a/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
index 634f4015..4c2c7070 100755
--- a/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
@@ -6,25 +6,25 @@ class CallbackOptionsTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=CallbackOptionsTest");
- $this->assertTextPresent("TCallbackOptions Test");
+ $this->assertContains("TCallbackOptions Test", $this->source());
$this->assertText("label1", "Label 1");
$this->assertText("label2", "Label 2");
$this->assertText("label3", "Label 3");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("label1", "Button 1 has returned");
$this->assertText("label2", "Label 2");
$this->assertText("label3", "Label 3");
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertText("label1", "Button 1 has returned");
$this->assertText("label2", "Button 2 has returned");
$this->assertText("label3", "Label 3");
- $this->click("{$base}button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertText("label1", "Button 1 has returned");
$this->assertText("label2", "Button 2 has returned");
diff --git a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
index d17cf90f..3b594b39 100755
--- a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
@@ -6,15 +6,15 @@ class CustomTemplateTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url('active-controls/index.php?page=CustomTemplateControlTest');
- $this->assertTextPresent('Add Dynamic Custom TTemplateControl Test');
+ $this->assertContains('Add Dynamic Custom TTemplateControl Test', $this->source());
$this->assertText("{$base}label1", 'Label 1');
$this->type("{$base}foo", 'Foo Bar!');
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertVisible("{$base}ctl0_ThePanel");
- $this->assertTextPresent("Client ID: {$base}ctl0_ThePanel");
+ $this->assertContains("Client ID: {$base}ctl0_ThePanel", $this->source());
$this->assertText("{$base}label1", 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!');
}
diff --git a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php
index 2b1eec75..49c268ad 100755
--- a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php
@@ -6,11 +6,11 @@ class DelayedCallbackTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=DelayedCallback");
- $this->assertTextPresent("Delayed Callback Test");
+ $this->assertContains("Delayed Callback Test", $this->source());
$this->assertText("{$base}status", "");
- $this->click("{$base}button1");
- $this->click("{$base}button2");
+ $this->byId("{$base}button1")->click();
+ $this->byId("{$base}button2")->click();
$this->pause("5000");
$this->assertText("{$base}status", "Callback 1 returned after 4s");
diff --git a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
index 7c73a8e8..dacdeaaa 100755
--- a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
@@ -6,11 +6,11 @@ class EventTriggerTestCase extends PradoGenericSelenium2Test
{
$base = "ctl0_Content_";
$this->url("active-controls/index.php?page=EventTriggeredCallback");
- $this->assertTextPresent("Event Triggered Callback Test");
+ $this->assertContains("Event Triggered Callback Test", $this->source());
$this->assertText("{$base}label1", 'Label 1');
- $this->click("button1");
+ $this->byId("button1")->click();
$this->pause(800);
$this->assertText("{$base}label1", 'button 1 clicked');
diff --git a/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php b/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
index 1b686d0a..f08a6f78 100755
--- a/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
@@ -6,17 +6,17 @@ class NestedActiveControlsTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=NestedActiveControls");
- $this->assertTextPresent("Nested Active Controls Test");
+ $this->assertContains("Nested Active Controls Test", $this->source());
$this->assertText("{$base}label1", "Label 1");
$this->assertText("{$base}label2", "Label 2");
- $this->assertTextNotPresent("Label 3");
+ $this->assertNotContains("Label 3", $this->source());
- $this->click("div1");
+ $this->byId("div1")->click();
$this->pause(800);
- $this->assertTextPresent("Something lalala");
+ $this->assertContains("Something lalala", $this->source());
$this->assertText("{$base}label3", "Label 3");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("{$base}label1", "Label 1: Button 1 Clicked");
$this->assertText("{$base}label2", "Label 2: Button 1 Clicked");
diff --git a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
index 92944429..e7f7f287 100755
--- a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
@@ -6,16 +6,16 @@ class PopulateListTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=PopulateActiveList");
- $this->assertTextPresent("Populate active list controls");
+ $this->assertContains("Populate active list controls", $this->source());
$this->assertText("{$base}label1", "");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->select("{$base}list1", "World");
$this->pause(800);
$this->assertText("{$base}label1", "list1: World");
- $this->click("{$base}button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->select("{$base}list2", "Prado");
$this->pause(800);
diff --git a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
index 99f21585..271a2ffb 100755
--- a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
@@ -6,16 +6,16 @@ class PostLoadingTestCase extends PradoGenericSelenium2Test
{
$base="ctl0_Content_";
$this->url('active-controls/index.php?page=PostLoadingTest');
- $this->assertTextPresent('PostLoading Test');
+ $this->assertContains('PostLoading Test', $this->source());
- $this->assertTextNotPresent('Hello World');
+ $this->assertNotContains('Hello World', $this->source());
- $this->click('div1');
+ $this->byId('div1')->click();
$this->pause(800);
$this->type("{$base}MyTextBox", 'Hello World');
- $this->click("{$base}MyButton");
+ $this->byId("{$base}MyButton")->click();
$this->pause(800);
- $this->assertTextPresent('Result is Hello World');
+ $this->assertContains('Result is Hello World', $this->source());
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
index 8f38ac17..c3345d6a 100755
--- a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
@@ -6,21 +6,21 @@ class ReplaceContentTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url('active-controls/index.php?page=ReplaceContentTest');
- $this->assertTextPresent('Callback Replace Content Test');
+ $this->assertContains('Callback Replace Content Test', $this->source());
$this->assertText("{$base}subpanel", 'Sub Panel');
$this->assertText("{$base}panel1", "Main Panel\nSub Panel");
$this->type("{$base}content", 'something');
- $this->click("{$base}btn_append");
+ $this->byId("{$base}btn_append")->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'Sub Panel something');
$this->assertText("{$base}panel1", "Main Panel\nSub Panel something");
$this->type("{$base}content", 'more');
- $this->click("{$base}btn_prepend");
+ $this->byId("{$base}btn_prepend")->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'more Sub Panel something');
@@ -28,18 +28,18 @@ class ReplaceContentTestCase extends PradoGenericSelenium2Test
$this->type("{$base}content", 'prado');
- $this->click("{$base}btn_before");
+ $this->byId("{$base}btn_before")->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'more Sub Panel something');
$this->assertText("{$base}panel1", "Main Panel prado\nmore Sub Panel something");
$this->type("{$base}content", ' php ');
- $this->click("{$base}btn_after");
+ $this->byId("{$base}btn_after")->click();
$this->pause(800);
$this->type("{$base}content", 'mauahahaha');
- $this->click("{$base}btn_replace");
+ $this->byId("{$base}btn_replace")->click();
$this->pause(1000);
$this->assertText("{$base}panel1", 'Main Panel pradomauahahaha php');
@@ -48,21 +48,21 @@ class ReplaceContentTestCase extends PradoGenericSelenium2Test
function testIE()
{
$this->url('active-controls/index.php?page=ReplaceContentTest');
- $this->assertTextPresent('Callback Replace Content Test');
+ $this->assertContains('Callback Replace Content Test', $this->source());
$this->assertText("{$base}subpanel", 'Sub Panel');
$this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel');
$this->type("{$base}content", 'something');
- $this->click('btn_append');
+ $this->byId('btn_append')->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'Sub Panel something');
$this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel\s*something');
$this->type("{$base}content", 'more');
- $this->click('btn_prepend');
+ $this->byId('btn_prepend')->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something');
@@ -70,18 +70,18 @@ class ReplaceContentTestCase extends PradoGenericSelenium2Test
$this->type("{$base}content", 'prado');
- $this->click('btn_before');
+ $this->byId('btn_before')->click();
$this->pause(800);
$this->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something');
$this->assertText("{$base}panel1", 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something');
$this->type("{$base}content", ' php ');
- $this->click('btn_after');
+ $this->byId('btn_after')->click();
$this->pause(800);
$this->type("{$base}content", 'mauahahaha');
- $this->click('btn_replace');
+ $this->byId('btn_replace')->click();
$this->pause(1000);
$this->assertText("{$base}panel1", 'Main Panel pradomauahahahaphp');
diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php
index d6728298..559c80a6 100755
--- a/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php
@@ -6,7 +6,7 @@ class TextBoxCallbackTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ActiveTextBoxCallback");
- $this->assertTextPresent("ActiveTextBox Callback Test");
+ $this->assertContains("ActiveTextBox Callback Test", $this->source());
$this->assertText("{$base}label1", "Label 1");
$this->type("{$base}textbox1", "hello!");
diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
index 1a5e1b2f..2562a18b 100755
--- a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
@@ -6,7 +6,7 @@ class TextBoxGroupValidationTestCase extends PradoGenericSelenium2Test
{
$base="ctl0_Content_";
$this->url("active-controls/index.php?page=TextBoxValidationCallback");
- $this->assertTextPresent('TextBox AutoPostBack With Group Validation');
+ $this->assertContains('TextBox AutoPostBack With Group Validation', $this->source());
$this->assertNotVisible("{$base}validator1");
$this->type("{$base}ZipCode", 'test');
diff --git a/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
index ee0cde18..741c7a2d 100755
--- a/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
@@ -6,11 +6,11 @@ class TimeTriggeredCallbackTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=TimeTriggeredCallbackTest");
- $this->assertTextPresent("TimeTriggeredCallback + ViewState Tests");
+ $this->assertContains("TimeTriggeredCallback + ViewState Tests", $this->source());
$this->assertText("{$base}label1", "ViewState Counter :");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(8000);
diff --git a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
index e89a65e4..8b0428a9 100755
--- a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
@@ -6,7 +6,7 @@ class ValueTriggerTestCase extends PradoGenericSelenium2Test
{
$base='ctl0_Content_';
$this->url("active-controls/index.php?page=ValueTriggerCallbackTest");
- $this->assertTextPresent("Value Trigger Callback Test");
+ $this->assertContains("Value Trigger Callback Test", $this->source());
$this->assertText("{$base}label1", 'Label 1');