summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-02-28 10:39:25 +0100
committerFabio Bas <ctrlaltca@gmail.com>2014-02-28 10:39:25 +0100
commit82774aa0a41562a325f31c901584ec01c8238573 (patch)
tree97931786ae69c7bf2b63fc87f232080e4b6c4b04 /tests/FunctionalTests/active-controls
parentd21f0991c5920ae8432ba4ad561f843bec718d9c (diff)
Ported all tests from Selenium1 (RC) to Selenium2 (WebDriver) using a compatibility layer
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page2
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php11
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php32
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php53
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php157
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php39
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php21
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php11
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php9
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php40
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php41
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php7
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php28
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php63
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php45
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CalculatorTestCase.php27
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php28
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php17
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php17
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php17
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php21
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/PopulateListTestCase.php21
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php9
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php74
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php19
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php17
31 files changed, 460 insertions, 431 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
index 8d38c758..ce40e1cb 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
@@ -1,12 +1,12 @@
<com:TContent ID="Content">
<h1>TActiveDatePicker test</h1>
<p>
-<com:TActiveDatePicker ID="datepicker" DateFormat="MM-dd-yyyy" OnCallback="testDatePicker"/>
<com:TActiveLabel ID="status" /><br/>
<com:TActiveButton ID="decreaseButton" OnClick="decrease" Text="-1" OnCallback="testDatePicker"/>
<com:TActiveButton ID="todayButton" OnClick="today" Text="Today" OnCallback="testDatePicker"/>
<com:TActiveButton ID="increaseButton" OnClick="increase" Text="+1" OnCallback="testDatePicker"/>
<com:TButton ID="toggleButton" OnClick="toggleMode" Text="Toggle input mode (postback)"/>
+<com:TActiveDatePicker ID="datepicker" DateFormat="MM-dd-yyyy" OnCallback="testDatePicker"/>
</p>
<p>
ShowCalendar=false
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
index 880c46fe..a98c14be 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
@@ -4,11 +4,12 @@ class ActiveButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveButtonTest");
- $this->verifyTextPresent("TActiveButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->clickOnElement("button2");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveButtonTest");
+ $this->assertTextPresent("TActiveButton Functional Test");
+ $this->assertText("{$base}label1", "Label 1");
+ $this->clickOnElement("{$base}button2");
$this->pause(800);
- $this->assertText("label1", "Button 1 was clicked using callback!");
+ $this->assertText("{$base}label1", "Button 1 was clicked using callback!");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
index 312b8443..e1e0ba4b 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
@@ -1,55 +1,57 @@
<?php
-class ActiveCheckBoxListTestCase extends PradoGenericSeleniumTest
+class ActiveCheckBoxListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=TActiveCheckBoxListTest");
- $this->verifyTextPresent("TActiveCheckBoxList Test Case");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=TActiveCheckBoxListTest");
+ $this->assertTextPresent("TActiveCheckBoxList Test Case");
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(800);
$this->assertCheckBoxes(array(1,2,3));
- $this->click("button2");
+ $this->click("{$base}button2");
$this->pause(800);
$this->assertCheckBoxes(array());
- $this->click("button3");
+ $this->click("{$base}button3");
$this->pause(800);
$this->assertCheckBoxes(array(0));
- $this->click("button4");
+ $this->click("{$base}button4");
$this->pause(800);
$this->assertCheckBoxes(array(4));
- $this->click("button5");
+ $this->click("{$base}button5");
$this->pause(800);
$this->assertCheckBoxes(array(1,4));
- $this->click("list1_c2");
+ $this->click("{$base}list1_c2");
$this->pause(800);
- $this->assertText("label1", "Selection: value 2, value 3, value 5");
+ $this->assertText("{$base}label1", "Selection: value 2, value 3, value 5");
- $this->click("list1_c2");
+ $this->click("{$base}list1_c2");
$this->pause(800);
- $this->assertText("label1", "Selection: value 2, value 5");
+ $this->assertText("{$base}label1", "Selection: value 2, value 5");
}
function assertCheckBoxes($checks, $total = 5)
{
+ $base='ctl0_Content_';
for($i = 0; $i < $total; $i++)
{
if(in_array($i, $checks))
- $this->assertChecked("list1_c{$i}");
+ $this->assertChecked("{$base}list1_c{$i}");
else
- $this->assertNotChecked("list1_c{$i}");
+ $this->assertNotChecked("{$base}list1_c{$i}");
}
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
index 6f235273..beedebc7 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
@@ -1,59 +1,60 @@
<?php
-class ActiveCheckBoxTestCase extends PradoGenericSeleniumTest
+class ActiveCheckBoxTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveCheckBoxTest");
- $this->verifyTextPresent("Active CheckBox Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveCheckBoxTest");
+ $this->assertTextPresent("Active CheckBox Test");
- $this->assertText("checkbox1_label", "CheckBox 1");
- $this->assertText("checkbox2_label", "CheckBox 2");
- $this->assertText('label1', 'Label 1');
+ $this->assertText("{$base}checkbox1_label", "CheckBox 1");
+ $this->assertText("{$base}checkbox2_label", "CheckBox 2");
+ $this->assertText("{$base}label1", 'Label 1');
- $this->click("change_text1");
+ $this->click("{$base}change_text1");
$this->pause(800);
- $this->assertText('checkbox1_label', 'Hello CheckBox 1');
+ $this->assertText("{$base}checkbox1_label", 'Hello CheckBox 1');
- $this->click("change_text2");
+ $this->click("{$base}change_text2");
$this->pause(800);
- $this->assertText('checkbox2_label', 'CheckBox 2 World');
+ $this->assertText("{$base}checkbox2_label", 'CheckBox 2 World');
//check box 1
- $this->click('change_checked1');
+ $this->click("{$base}change_checked1");
$this->pause(800);
- $this->assertChecked('checkbox1');
+ $this->assertChecked("{$base}checkbox1");
- $this->click('change_checked1');
+ $this->click("{$base}change_checked1");
$this->pause(800);
- $this->assertNotChecked('checkbox1');
+ $this->assertNotChecked("{$base}checkbox1");
//check box 2
- $this->click('change_checked2');
+ $this->click("{$base}change_checked2");
$this->pause(800);
- $this->assertChecked('checkbox2');
+ $this->assertChecked("{$base}checkbox2");
- $this->click('change_checked2');
+ $this->click("{$base}change_checked2");
$this->pause(800);
- $this->assertNotChecked('checkbox2');
+ $this->assertNotChecked("{$base}checkbox2");
//click checkbox 1
- $this->click("checkbox1");
+ $this->click("{$base}checkbox1");
$this->pause(800);
- $this->assertText("label1", "Label 1:Hello CheckBox 1 Checked");
+ $this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Checked");
- $this->click("checkbox1");
+ $this->click("{$base}checkbox1");
$this->pause(800);
- $this->assertText("label1", "Label 1:Hello CheckBox 1 Not Checked");
+ $this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Not Checked");
//click checkbox 2
- $this->click("checkbox2");
+ $this->click("{$base}checkbox2");
$this->pause(800);
- $this->assertText("label1", "Label 1:CheckBox 2 World Checked");
+ $this->assertText("{$base}label1", "Label 1:CheckBox 2 World Checked");
- $this->click("checkbox2");
+ $this->click("{$base}checkbox2");
$this->pause(800);
- $this->assertText("label1", "Label 1:CheckBox 2 World Not Checked");
+ $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 75b86e19..d5c8b4f0 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php
@@ -1,18 +1,19 @@
<?php
-class ActiveControlExpressionTagTestCase extends PradoGenericSeleniumTest
+class ActiveControlExpressionTagTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('active-controls/index.php?page=ActiveControlExpressionTag');
+ $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->type('textbox1', 'Hello world');
- $this->click('button1');
+ $this->type("{$base}textbox1", 'Hello world');
+ $this->click("{$base}button1");
$this->pause(800);
- $this->assertText('repeats', 'result - 1 result - two');
- $this->assertText('contents', 'Text box content: Hello world');
+ $this->assertText("repeats", 'result - 1 result - two');
+ $this->assertText("contents", 'Text box content: Hello world');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
index be0a6fb4..0d6e2203 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
@@ -1,118 +1,119 @@
<?php
-class ActiveDatePickerTestCase extends PradoGenericSeleniumTest
+class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveDatePicker");
- $this->verifyTextPresent("TActiveDatePicker test");
- $this->verifyText("status", "");
- $this->verifyValue("datepicker", date('m-d-Y'));
- $this->click("increaseButton");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveDatePicker");
+ $this->assertTextPresent("TActiveDatePicker test");
+ $this->assertText("{$base}status", "");
+ $this->assertValue("{$base}datepicker", date('m-d-Y'));
+ $this->click("{$base}increaseButton");
$this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 1 day')));
- $this->verifyText("status", date('m-d-Y', strtotime('+ 1 day')));
- $this->click("increaseButton");
+ $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->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 2 day')));
- $this->verifyText("status", date('m-d-Y', strtotime('+ 2 day')));
- $this->click("todayButton");
+ $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->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y'));
- $this->verifyText("status", date('m-d-Y'));
- $this->click("decreaseButton");
+ $this->assertValue("{$base}datepicker", date('m-d-Y'));
+ $this->assertText("{$base}status", date('m-d-Y'));
+ $this->click("{$base}decreaseButton");
$this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y', strtotime('- 1 day')));
- $this->verifyText("status", date('m-d-Y', strtotime('- 1 day')));
- $this->click("datepicker");
+ $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->pause(800);
$this->click("css=input.todayButton");
$this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y'));
- $this->verifyText("status", date('m-d-Y'));
+ $this->assertValue("{$base}datepicker", date('m-d-Y'));
+ $this->assertText("{$base}status", date('m-d-Y'));
$this->click("css=input.nextMonthButton");
$this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 1 month')));
- $this->verifyText("status", date('m-d-Y', strtotime('+1 month')));
-
- $this->click('toggleButton');
+ $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->pause(2000);
-
- $this->click("todayButton");
+
+ $this->click("{$base}todayButton");
$this->pause(800);
- $this->assertSelected("datepicker_month", date('m'));
- $this->verifyText("status", date('m-d-Y'));
-
- $this->click("increaseButton");
+ $this->assertSelected("{$base}datepicker_month", date('m'));
+ $this->assertText("{$base}status", date('m-d-Y'));
+
+ $this->click("{$base}increaseButton");
$this->pause(800);
$dateToCheck=strtotime('+ 1 day');
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("increaseButton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->click("{$base}increaseButton");
$this->pause(800);
$dateToCheck=strtotime('+ 2 day');
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("todayButton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->click("{$base}todayButton");
$this->pause(800);
$dateToCheck=time();
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("decreaseButton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->click("{$base}decreaseButton");
$this->pause(800);
$dateToCheck=strtotime('- 1 day');
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("datepickerbutton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->click("{$base}datepickerbutton");
$this->pause(800);
$this->click("css=input.todayButton");
$this->pause(800);
$dateToCheck=time();
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
$this->click("css=input.nextMonthButton");
$this->pause(800);
$dateToCheck=strtotime('+ 1 month');
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click('ctl1');
- $this->pause(800);
-
- $this->verifyText("status2", "");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->click('ctl0_ctl1');
+ $this->pause(800);
+
+ $this->assertText("{$base}status2", "");
$dateToCheck=time();
- $this->assertSelected("datepicker2_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker2_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker2_year", date('Y', $dateToCheck));
- $this->select("datepicker2_year", date('Y')+1);
+ $this->assertSelected("{$base}datepicker2_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker2_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker2_year", date('Y', $dateToCheck));
+ $this->select("{$base}datepicker2_year", date('Y')+1);
$this->pause(800);
$dateToCheck=mktime(0,0,0,(int)date('m'),(int)date('d'), date('Y')+1);
- $this->verifyText("status2", date('m-d-Y', $dateToCheck));
+ $this->assertText("{$base}status2", date('m-d-Y', $dateToCheck));
- $this->verifyText("status3", "");
+ $this->assertText("{$base}status3", "");
$dateToCheck=time();
- $this->assertSelected("datepicker3_month", date('F', $dateToCheck));
- $this->assertSelected("datepicker3_year", date('Y', $dateToCheck));
- $this->select("datepicker3_year", date('Y')+1);
+ $this->assertSelected("{$base}datepicker3_month", date('F', $dateToCheck));
+ $this->assertSelected("{$base}datepicker3_year", date('Y', $dateToCheck));
+ $this->select("{$base}datepicker3_year", date('Y')+1);
$this->pause(800);
$dateToCheck=mktime(0,0,0,(int)date('m'),(int)date('d'), date('Y')+1);
- $this->verifyText("status3", date('m/Y', $dateToCheck));
+ $this->assertText("{$base}status3", date('m/Y', $dateToCheck));
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
index a54cbd75..f3bc8dc8 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
@@ -1,45 +1,46 @@
<?php
-class ActiveDropDownListTestCase extends PradoGenericSeleniumTest
+class ActiveDropDownListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveDropDownList");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveDropDownList");
$this->assertTextPresent('Active Drop Down List Test Case');
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(800);
- $this->assertSelected("list1", "item 4");
+ $this->assertSelected("{$base}list1", "item 4");
- $this->click("button2");
+ $this->click("{$base}button2");
$this->pause(800);
- $this->assertSelectedIndex("list1", 0);
+ $this->assertSelectedValue("{$base}list1", 'value 1');
- $this->click("button3");
+ $this->click("{$base}button3");
$this->pause(800);
- $this->assertSelected("list1", "item 2");
+ $this->assertSelected("{$base}list1", "item 2");
- $this->assertText("label1", "Selection 1: value 1");
+ $this->assertText("{$base}label1", "Selection 1: value 1");
- $this->select("list1", "item 1");
+ $this->select("{$base}list1", "item 1");
$this->pause(800);
- $this->select("list2", "value 1 - item 4");
+ $this->select("{$base}list2", "value 1 - item 4");
$this->pause(800);
- $this->assertText("label2", "Selection 2: value 1 - item 4");
+ $this->assertText("{$base}label2", "Selection 2: value 1 - item 4");
- $this->select("list1", "item 3");
+ $this->select("{$base}list1", "item 3");
$this->pause(800);
- $this->select("list2", "value 3 - item 5");
+ $this->select("{$base}list2", "value 3 - item 5");
$this->pause(800);
- $this->assertText("label2", "Selection 2: value 3 - item 5");
+ $this->assertText("{$base}label2", "Selection 2: value 3 - item 5");
- $this->click('button4');
+ $this->click("{$base}button4");
$this->pause(800);
- $this->assertSelected('list1', 'item 3');
+ $this->assertSelected("{$base}list1", 'item 3');
$this->pause(300);
- $this->assertSelected('list2', 'value 3 - item 3');
+ $this->assertSelected("{$base}list2", 'value 3 - item 3');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
index b8c02868..2aedee05 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
@@ -1,22 +1,23 @@
<?php
-class ActiveHiddenFieldTestCase extends PradoGenericSeleniumTest
+class ActiveHiddenFieldTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveHiddenFieldTest");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveHiddenFieldTest");
$fieldEmpty = 'No longer empty';
$fieldUsed = 'My value';
-
- $this->verifyTextPresent('Value of current hidden field');
- $this->click('Button1');
+
+ $this->assertTextPresent('Value of current hidden field');
+ $this->click("{$base}Button1");
$this->pause(800);
- $this->assertText('ResponseLabel', $fieldEmpty);
- $this->click('Button2');
+ $this->assertText("{$base}ResponseLabel", $fieldEmpty);
+ $this->click("{$base}Button2");
$this->pause(800);
- $this->assertText('ResponseLabel', $fieldUsed);
- $this->click('Button3');
+ $this->assertText("{$base}ResponseLabel", $fieldUsed);
+ $this->click("{$base}Button3");
$this->pause(800);
- $this->assertText('ResponseLabel', $fieldEmpty.'|'.$fieldUsed);
+ $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 bfcdd206..47a90851 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php
@@ -1,16 +1,17 @@
<?php
-class ActiveHyperLinkTestCase extends PradoGenericSeleniumTest
+class ActiveHyperLinkTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveHyperLinkTest");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveHyperLinkTest");
$this->assertTextPresent("Active HyperLink Test Case");
- $this->assertText("link1", "Link 1");
+ $this->assertText("{$base}link1", "Link 1");
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(800);
- $this->assertText("link1", "Pradosoft.com");
+ $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 2989ab27..0d9f219d 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php
@@ -1,13 +1,14 @@
<?php
-class ActiveImageButtonTestCase extends PradoGenericSeleniumTest
+class ActiveImageButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveImageButtonTest");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveImageButtonTest");
$this->assertTextPresent("TActiveImageButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("image1");
+ $this->assertText("{$base}label1", "Label 1");
+ $this->click("{$base}image1");
$this->pause(800);
//unable to determine mouse position
$this->assertTextPresent("regexp:Image clicked at x=\d+, y=\d+");
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
index 88cdf15e..3e67b516 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
@@ -1,14 +1,15 @@
<?php
-class ActiveLinkButtonTestCase extends PradoGenericSeleniumTest
+class ActiveLinkButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveLinkButtonTest");
- $this->verifyTextPresent("TActiveLinkButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("button2");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveLinkButtonTest");
+ $this->assertTextPresent("TActiveLinkButton Functional Test");
+ $this->assertText("{$base}label1", "Label 1");
+ $this->click("{$base}button2");
$this->pause(800);
- $this->assertText("label1", "Button 1 was clicked using callback!");
+ $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 911e3cc7..31b80bff 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php
@@ -1,48 +1,48 @@
<?php
-class ActiveListBoxMasterTestCase extends PradoGenericSeleniumTest
+class ActiveListBoxMasterTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveListBoxMasterTest");
+ $this->url("active-controls/index.php?page=ActiveListBoxMasterTest");
$this->assertTextPresent('Active List Box Functional Test');
$base = 'ctl0_body_';
- $this->assertText($base."label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click($base."button1");
+ $this->click("{$base}button1");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->click($base.'button3');
+ $this->click("{$base}button3");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 1'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1'));
- $this->click($base.'button4');
+ $this->click("{$base}button4");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 5'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5'));
- $this->click($base.'button5');
+ $this->click("{$base}button5");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 5'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5'));
- $this->click($base.'button2');
+ $this->click("{$base}button2");
$this->pause(800);
- $this->assertNotSomethingSelected($base."list1");
+ $this->assertNotSomethingSelected("{$base}list1");
- $this->click($base.'button6');
+ $this->click("{$base}button6");
$this->pause(800);
- $this->click($base."button1");
+ $this->click("{$base}button1");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->select($base."list1", "item 1");
+ $this->select("{$base}list1", "item 1");
$this->pause(800);
- $this->assertText($base.'label1', 'Selection: value 1');
+ $this->assertText("{$base}label1", 'Selection: value 1');
- $this->addSelection($base."list1", "item 4");
+ $this->addSelection("{$base}list1", "item 4");
$this->pause(800);
- $this->assertText($base.'label1', 'Selection: value 1, value 4');
+ $this->assertText("{$base}label1", 'Selection: value 1, value 4');
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
index d45cb42c..8818f78e 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
@@ -1,46 +1,47 @@
<?php
-class ActiveListBoxTestCase extends PradoGenericSeleniumTest
+class ActiveListBoxTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveListBoxTest");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveListBoxTest");
$this->assertTextPresent('Active List Box Functional Test');
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->click('button3');
+ $this->click("{$base}button3");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 1'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1'));
- $this->click('button4');
+ $this->click("{$base}button4");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 5'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5'));
- $this->click('button5');
+ $this->click("{$base}button5");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 5'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5'));
- $this->click('button2');
+ $this->click("{$base}button2");
$this->pause(800);
- $this->assertNotSomethingSelected("list1");
+ $this->assertNotSomethingSelected("{$base}list1");
- $this->click('button6');
+ $this->click("{$base}button6");
$this->pause(800);
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->select("list1", "item 1");
+ $this->select("{$base}list1", "item 1");
$this->pause(800);
- $this->assertText('label1', 'Selection: value 1');
+ $this->assertText("{$base}label1", 'Selection: value 1');
- $this->addSelection("list1", "item 4");
+ $this->addSelection("{$base}list1", "item 4");
$this->pause(800);
- $this->assertText('label1', 'Selection: value 1, value 4');
+ $this->assertText("{$base}label1", 'Selection: value 1, value 4');
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php b/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
index 9b069a14..528b542c 100755
--- a/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
@@ -1,11 +1,12 @@
<?php
-class ActivePanelTestCase extends PradoGenericSeleniumTest
+class ActivePanelTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActivePanelTest");
- $this->verifyTextPresent("Active Panel replacement tests");
+ $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->pause(800);
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
index b0942ffa..597567a0 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
@@ -1,45 +1,47 @@
<?php
-class ActiveRadioButtonListTestCase extends PradoGenericSeleniumTest
+class ActiveRadioButtonListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveRadioButtonListTest");
- $this->verifyTextPresent("TActiveRadioButtonList Test Case");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveRadioButtonListTest");
+ $this->assertTextPresent("TActiveRadioButtonList Test Case");
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click("button3");
+ $this->click("{$base}button3");
$this->pause(800);
$this->assertCheckBoxes(array(0));
- $this->click("button2");
+ $this->click("{$base}button2");
$this->pause(800);
$this->assertCheckBoxes(array());
- $this->click("button4");
+ $this->click("{$base}button4");
$this->pause(800);
$this->assertCheckBoxes(array(4));
- $this->click("list1_c2");
+ $this->click("{$base}list1_c2");
$this->pause(800);
- $this->assertText("label1", "Selection: value 3");
+ $this->assertText("{$base}label1", "Selection: value 3");
- $this->click("list1_c3");
+ $this->click("{$base}list1_c3");
$this->pause(800);
- $this->assertText("label1", "Selection: value 4");
+ $this->assertText("{$base}label1", "Selection: value 4");
}
function assertCheckBoxes($checks, $total = 5)
{
+ $base='ctl0_Content_';
for($i = 0; $i < $total; $i++)
{
if(in_array($i, $checks))
- $this->assertChecked("list1_c{$i}");
+ $this->assertChecked("{$base}list1_c{$i}");
else
- $this->assertNotChecked("list1_c{$i}");
+ $this->assertNotChecked("{$base}list1_c{$i}");
}
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
index fceb2e21..04837ef4 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
@@ -1,52 +1,53 @@
<?php
-class ActiveRadioButtonTestCase extends PradoGenericSeleniumTest
+class ActiveRadioButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveRadioButtonTest");
- $this->verifyTextPresent("Active Radio Button Test");
- $this->assertText('label1', 'Label 1');
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveRadioButtonTest");
+ $this->assertTextPresent("Active Radio Button Test");
+ $this->assertText("{$base}label1", 'Label 1');
- $this->assertNotChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertNotChecked("{$base}radio1");
+ $this->assertNotChecked("{$base}radio2");
+ $this->assertNotChecked("{$base}radio3");
- $this->assertText('radio1_label', 'Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $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('change_text1');
+ $this->click("{$base}change_text1");
$this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $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('change_text2');
+ $this->click("{$base}change_text2");
$this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2 World');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $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('change_radio1');
+ $this->click("{$base}change_radio1");
$this->pause(800);
- $this->assertChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertChecked("{$base}radio1");
+ $this->assertNotChecked("{$base}radio2");
+ $this->assertNotChecked("{$base}radio3");
- $this->click('change_radio2');
+ $this->click("{$base}change_radio2");
$this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertNotChecked("{$base}radio1");
+ $this->assertChecked("{$base}radio2");
+ $this->assertNotChecked("{$base}radio3");
- $this->click('radio3');
+ $this->click("{$base}radio3");
$this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertChecked('radio3');
- $this->assertText('label1', 'Label 1:Radio Button 3 Checked');
+ $this->assertNotChecked("{$base}radio1");
+ $this->assertChecked("{$base}radio2");
+ $this->assertChecked("{$base}radio3");
+ $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 94cae5f2..f6dfc22b 100755
--- a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
@@ -1,42 +1,43 @@
<?php
-class AutoCompleteTestCase extends PradoGenericSeleniumTest
+class AutoCompleteTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=AutoCompleteTest");
- $this->verifyTextPresent("TAutoComplete Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=AutoCompleteTest");
+ $this->assertTextPresent("TAutoComplete Test");
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->type("textbox3", 'a');
- $this->runScript('Prado.Registry[\'textbox3\'].onKeyPress({})');
+ $this->click("{$base}textbox3");
+ $this->keys('a');
$this->pause(500);
- $this->verifyTextPresent('Andorra');
- $this->assertText("label1", "suggestion for a");
+ $this->assertTextPresent('Andorra');
+ $this->assertText("{$base}label1", "suggestion for a");
- $this->type("textbox3", 'au');
- $this->runScript('Prado.Registry[\'textbox3\'].onKeyPress({})');
+ $this->keys('u');
$this->pause(500);
- $this->verifyTextPresent('Australia');
- $this->assertText("label1", "suggestion for au");
+ $this->assertTextPresent('Australia');
+ $this->assertText("{$base}label1", "suggestion for au");
- $this->click("css=#textbox3_result ul li");
+ $this->click("css=#{$base}textbox3_result ul li");
$this->pause(500);
- $this->assertText("label1", "Label 1: Austria");
+ $this->assertText("{$base}label1", "Label 1: Austria");
- $this->type("textbox2", "cu");
- $this->runScript('Prado.Registry[\'textbox2\'].onKeyPress({})');
+
+ $this->click("{$base}textbox2");
+ $this->keys('cu');
$this->pause(500);
- $this->click('css=#textbox2_result ul li');
+ $this->click("css=#{$base}textbox2_result ul li");
$this->pause(500);
- $this->assertText("label1", "Label 1: Cuba");
+ $this->assertText("{$base}label1", "Label 1: Cuba");
- $this->type("textbox2", "Cuba,me");
- $this->runScript('Prado.Registry[\'textbox2\'].onKeyPress({})');
+ $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::END);
+ $this->keys(',me');
$this->pause(500);
- $this->click('css=#textbox2_result ul li');
+ $this->click("css=#{$base}textbox2_result ul li");
$this->pause(500);
- $this->assertText("label1", "Label 1: Cuba,Mexico");
+ $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 48960d39..28cbb870 100755
--- a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
@@ -1,23 +1,24 @@
<?php
-class CalculatorTestCase extends PradoGenericSeleniumTest
+class CalculatorTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=Calculator");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=Calculator");
$this->assertTextPresent("Callback Enabled Calculator");
- $this->assertNotVisible("summary");
-
- $this->click("sum");
- $this->assertVisible("summary");
-
- $this->type("a", "2");
- $this->type("b", "5");
-
- $this->click("sum");
+ $this->assertNotVisible("{$base}summary");
+
+ $this->click("{$base}sum");
+ $this->assertVisible("{$base}summary");
+
+ $this->type("{$base}a", "2");
+ $this->type("{$base}b", "5");
+
+ $this->click("{$base}sum");
$this->pause(500);
- $this->assertNotVisible("summary");
- $this->assertValue("c", "7");
+ $this->assertNotVisible("{$base}summary");
+ $this->assertValue("{$base}c", "7");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
index c495935a..75de3419 100755
--- a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
@@ -1,29 +1,29 @@
<?php
-class CallbackAdapterTestCase extends PradoGenericSeleniumTest
+class CallbackAdapterTestCase extends PradoGenericSelenium2Test
{
function test()
{
-
- $this->open("active-controls/index.php?page=ControlAdapterTest");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ControlAdapterTest");
$this->assertTextPresent('Control Adapter - State Tracking Tests');
- $this->click('button2');
+ $this->click("{$base}button2");
$this->assertAlert('ok');
- $this->click('test6');
+ $this->click("{$base}test6");
$this->pause(800);
- $this->click('test7');
+ $this->click("{$base}test7");
$this->pause(800);
- $this->click('test8');
+ $this->click("{$base}test8");
$this->pause(800);
- $this->click('test9');
+ $this->click("{$base}test9");
$this->pause(800);
- $this->click('button1');
+ $this->click("{$base}button1");
$this->assertAlert('haha!');
- $this->click('button2');
+ $this->click("{$base}button2");
$this->assertAlert('ok');
$this->assertAlert('baz!');
@@ -31,10 +31,10 @@ class CallbackAdapterTestCase extends PradoGenericSeleniumTest
/*
function testIE()
{
- $this->open("active-controls/index.php?page=ControlAdapterTest");
+ $this->url("active-controls/index.php?page=ControlAdapterTest");
$this->assertTextPresent('Control Adapter - State Tracking Tests');
- $this->click('button2');
+ $this->click("{$base}button2");
$this->assertAlert('ok');
$this->click('test6');
@@ -46,11 +46,11 @@ class CallbackAdapterTestCase extends PradoGenericSeleniumTest
$this->click('test9');
$this->pause(800);
- $this->click('button1');
+ $this->click("{$base}button1");
$this->assertAlert('haha!');
//IE alerts in diffrent order
- $this->click('button2');
+ $this->click("{$base}button2");
$this->assertAlert('baz!');
$this->assertAlert('ok');
}
diff --git a/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
index d1f48cf3..634f4015 100755
--- a/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
@@ -1,29 +1,30 @@
<?php
-class CallbackOptionsTestCase extends PradoGenericSeleniumTest
+class CallbackOptionsTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=CallbackOptionsTest");
- $this->verifyTextPresent("TCallbackOptions Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=CallbackOptionsTest");
+ $this->assertTextPresent("TCallbackOptions Test");
$this->assertText("label1", "Label 1");
$this->assertText("label2", "Label 2");
$this->assertText("label3", "Label 3");
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(800);
$this->assertText("label1", "Button 1 has returned");
$this->assertText("label2", "Label 2");
$this->assertText("label3", "Label 3");
- $this->click("button2");
+ $this->click("{$base}button2");
$this->pause(800);
$this->assertText("label1", "Button 1 has returned");
$this->assertText("label2", "Button 2 has returned");
$this->assertText("label3", "Label 3");
- $this->click("button3");
+ $this->click("{$base}button3");
$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 e72d021e..d17cf90f 100755
--- a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
@@ -1,20 +1,21 @@
<?php
-class CustomTemplateTestCase extends PradoGenericSeleniumTest
+class CustomTemplateTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('active-controls/index.php?page=CustomTemplateControlTest');
+ $base='ctl0_Content_';
+ $this->url('active-controls/index.php?page=CustomTemplateControlTest');
$this->assertTextPresent('Add Dynamic Custom TTemplateControl Test');
- $this->assertText('label1', 'Label 1');
+ $this->assertText("{$base}label1", 'Label 1');
- $this->type('foo', 'Foo Bar!');
- $this->click('button2');
+ $this->type("{$base}foo", 'Foo Bar!');
+ $this->click("{$base}button2");
$this->pause(800);
- $this->assertVisible('ctl0_ThePanel');
- $this->assertTextPresent('Client ID: ctl0_ThePanel');
+ $this->assertVisible("{$base}ctl0_ThePanel");
+ $this->assertTextPresent("Client ID: {$base}ctl0_ThePanel");
- $this->assertText('label1', 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!');
+ $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 841de5aa..2b1eec75 100755
--- a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php
@@ -1,20 +1,21 @@
<?php
-class DelayedCallbackTestCase extends PradoGenericSeleniumTest
+class DelayedCallbackTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=DelayedCallback");
- $this->verifyTextPresent("Delayed Callback Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=DelayedCallback");
+ $this->assertTextPresent("Delayed Callback Test");
- $this->assertText("status", "");
- $this->click("button1");
- $this->click("button2");
+ $this->assertText("{$base}status", "");
+ $this->click("{$base}button1");
+ $this->click("{$base}button2");
$this->pause("5000");
- $this->assertText("status", "Callback 1 returned after 4s");
+ $this->assertText("{$base}status", "Callback 1 returned after 4s");
$this->pause("3000");
- $this->assertText("status", "Callback 2 delayed 2s");
+ $this->assertText("{$base}status", "Callback 2 delayed 2s");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
index 30678786..7c73a8e8 100755
--- a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
@@ -1,20 +1,21 @@
<?php
-class EventTriggerTestCase extends PradoGenericSeleniumTest
+class EventTriggerTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=EventTriggeredCallback");
- $this->verifyTextPresent("Event Triggered Callback Test");
+ $base = "ctl0_Content_";
+ $this->url("active-controls/index.php?page=EventTriggeredCallback");
+ $this->assertTextPresent("Event Triggered Callback Test");
- $this->assertText('label1', 'Label 1');
+ $this->assertText("{$base}label1", 'Label 1');
- $this->click('button1');
+ $this->click("button1");
$this->pause(800);
- $this->assertText('label1', 'button 1 clicked');
+ $this->assertText("{$base}label1", 'button 1 clicked');
- $this->type('text1', 'test');
+ $this->type("{$base}text1", 'test');
$this->pause(800);
- $this->assertText('label1', 'text 1 focused');
+ $this->assertText("{$base}label1", 'text 1 focused');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php b/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
index e2ceb33e..1b686d0a 100755
--- a/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
@@ -1,24 +1,25 @@
<?php
-class NestedActiveControlsTestCase extends PradoGenericSeleniumTest
+class NestedActiveControlsTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=NestedActiveControls");
- $this->verifyTextPresent("Nested Active Controls Test");
- $this->assertText("label1", "Label 1");
- $this->assertText("label2", "Label 2");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=NestedActiveControls");
+ $this->assertTextPresent("Nested Active Controls Test");
+ $this->assertText("{$base}label1", "Label 1");
+ $this->assertText("{$base}label2", "Label 2");
$this->assertTextNotPresent("Label 3");
$this->click("div1");
$this->pause(800);
$this->assertTextPresent("Something lalala");
- $this->assertText("label3", "Label 3");
+ $this->assertText("{$base}label3", "Label 3");
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(800);
- $this->assertText("label1", "Label 1: Button 1 Clicked");
- $this->assertText("label2", "Label 2: Button 1 Clicked");
- $this->assertText("label3", "Label 3: Button 1 Clicked");
+ $this->assertText("{$base}label1", "Label 1: Button 1 Clicked");
+ $this->assertText("{$base}label2", "Label 2: Button 1 Clicked");
+ $this->assertText("{$base}label3", "Label 3: Button 1 Clicked");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
index adb5a3a5..92944429 100755
--- a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
@@ -1,23 +1,24 @@
<?php
-class PopulateListTestCase extends PradoGenericSeleniumTest
+class PopulateListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=PopulateActiveList");
- $this->verifyTextPresent("Populate active list controls");
- $this->assertText("label1", "");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=PopulateActiveList");
+ $this->assertTextPresent("Populate active list controls");
+ $this->assertText("{$base}label1", "");
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(800);
- $this->select("list1", "World");
+ $this->select("{$base}list1", "World");
$this->pause(800);
- $this->assertText("label1", "list1: World");
+ $this->assertText("{$base}label1", "list1: World");
- $this->click("button2");
+ $this->click("{$base}button2");
$this->pause(800);
- $this->select("list2", "Prado");
+ $this->select("{$base}list2", "Prado");
$this->pause(800);
- $this->assertText("label1", "list2: Prado");
+ $this->assertText("{$base}label1", "list2: Prado");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
index 21a5128d..99f21585 100755
--- a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
@@ -1,18 +1,19 @@
<?php
-class PostLoadingTestCase extends PradoGenericSeleniumTest
+class PostLoadingTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('active-controls/index.php?page=PostLoadingTest');
+ $base="ctl0_Content_";
+ $this->url('active-controls/index.php?page=PostLoadingTest');
$this->assertTextPresent('PostLoading Test');
$this->assertTextNotPresent('Hello World');
$this->click('div1');
$this->pause(800);
- $this->type('MyTextBox', 'Hello World');
- $this->click('MyButton');
+ $this->type("{$base}MyTextBox", 'Hello World');
+ $this->click("{$base}MyButton");
$this->pause(800);
$this->assertTextPresent('Result is Hello World');
diff --git a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
index fd273ae7..8f38ac17 100755
--- a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
@@ -1,90 +1,90 @@
<?php
-class ReplaceContentTestCase extends PradoGenericSeleniumTest
+class ReplaceContentTestCase extends PradoGenericSelenium2Test
{
function test()
{
-
- $this->open('active-controls/index.php?page=ReplaceContentTest');
+ $base='ctl0_Content_';
+ $this->url('active-controls/index.php?page=ReplaceContentTest');
$this->assertTextPresent('Callback Replace Content Test');
- $this->assertText('subpanel', 'Sub Panel');
- $this->assertText('panel1', 'Main Panel Sub Panel');
+ $this->assertText("{$base}subpanel", 'Sub Panel');
+ $this->assertText("{$base}panel1", "Main Panel\nSub Panel");
- $this->type('content', 'something');
+ $this->type("{$base}content", 'something');
- $this->click('btn_append');
+ $this->click("{$base}btn_append");
$this->pause(800);
- $this->assertText('subpanel', 'Sub Panel something');
- $this->assertText('panel1', 'Main Panel Sub Panel something');
+ $this->assertText("{$base}subpanel", 'Sub Panel something');
+ $this->assertText("{$base}panel1", "Main Panel\nSub Panel something");
- $this->type('content', 'more');
- $this->click('btn_prepend');
+ $this->type("{$base}content", 'more');
+ $this->click("{$base}btn_prepend");
$this->pause(800);
- $this->assertText('subpanel', 'more Sub Panel something');
- $this->assertText('panel1', 'Main Panel more Sub Panel something');
+ $this->assertText("{$base}subpanel", 'more Sub Panel something');
+ $this->assertText("{$base}panel1", "Main Panel\nmore Sub Panel something");
- $this->type('content', 'prado');
- $this->click('btn_before');
+ $this->type("{$base}content", 'prado');
+ $this->click("{$base}btn_before");
$this->pause(800);
- $this->assertText('subpanel', 'more Sub Panel something');
- $this->assertText('panel1', 'Main Panel pradomore Sub Panel something');
+ $this->assertText("{$base}subpanel", 'more Sub Panel something');
+ $this->assertText("{$base}panel1", "Main Panel prado\nmore Sub Panel something");
- $this->type('content', ' php ');
- $this->click('btn_after');
+ $this->type("{$base}content", ' php ');
+ $this->click("{$base}btn_after");
$this->pause(800);
- $this->type('content', 'mauahahaha');
- $this->click('btn_replace');
+ $this->type("{$base}content", 'mauahahaha');
+ $this->click("{$base}btn_replace");
$this->pause(1000);
- $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
+ $this->assertText("{$base}panel1", 'Main Panel pradomauahahaha php');
}
/*
function testIE()
{
- $this->open('active-controls/index.php?page=ReplaceContentTest');
+ $this->url('active-controls/index.php?page=ReplaceContentTest');
$this->assertTextPresent('Callback Replace Content Test');
- $this->assertText('subpanel', 'Sub Panel');
- $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel');
+ $this->assertText("{$base}subpanel", 'Sub Panel');
+ $this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel');
- $this->type('content', 'something');
+ $this->type("{$base}content", 'something');
$this->click('btn_append');
$this->pause(800);
- $this->assertText('subpanel', 'Sub Panel something');
- $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel\s*something');
+ $this->assertText("{$base}subpanel", 'Sub Panel something');
+ $this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel\s*something');
- $this->type('content', 'more');
+ $this->type("{$base}content", 'more');
$this->click('btn_prepend');
$this->pause(800);
- $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something');
- $this->assertText('panel1', 'regexp:Main Panel\s*moreSub Panel\s*something');
+ $this->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something');
+ $this->assertText("{$base}panel1", 'regexp:Main Panel\s*moreSub Panel\s*something');
- $this->type('content', 'prado');
+ $this->type("{$base}content", 'prado');
$this->click('btn_before');
$this->pause(800);
- $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something');
- $this->assertText('panel1', 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something');
+ $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('content', ' php ');
+ $this->type("{$base}content", ' php ');
$this->click('btn_after');
$this->pause(800);
- $this->type('content', 'mauahahaha');
+ $this->type("{$base}content", 'mauahahaha');
$this->click('btn_replace');
$this->pause(1000);
- $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
+ $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 14d575fe..d6728298 100755
--- a/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php
@@ -1,15 +1,16 @@
<?php
-class TextBoxCallbackTestCase extends PradoGenericSeleniumTest
+class TextBoxCallbackTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveTextBoxCallback");
- $this->verifyTextPresent("ActiveTextBox Callback Test");
- $this->assertText("label1", "Label 1");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveTextBoxCallback");
+ $this->assertTextPresent("ActiveTextBox Callback Test");
+ $this->assertText("{$base}label1", "Label 1");
- $this->type("textbox1", "hello!");
+ $this->type("{$base}textbox1", "hello!");
$this->pause(800);
- $this->assertText("label1", "Label 1: hello!");
+ $this->assertText("{$base}label1", "Label 1: hello!");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
index ffc1ac72..1a5e1b2f 100755
--- a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
@@ -1,22 +1,23 @@
<?php
-class TextBoxGroupValidationTestCase extends PradoGenericSeleniumTest
+class TextBoxGroupValidationTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=TextBoxValidationCallback");
+ $base="ctl0_Content_";
+ $this->url("active-controls/index.php?page=TextBoxValidationCallback");
$this->assertTextPresent('TextBox AutoPostBack With Group Validation');
- $this->assertNotVisible('validator1');
+ $this->assertNotVisible("{$base}validator1");
- $this->type('ZipCode', 'test');
- $this->assertVisible('validator1');
+ $this->type("{$base}ZipCode", 'test');
+ $this->assertVisible("{$base}validator1");
- $this->type('Address', 'Sydney');
- $this->type('ZipCode', '2000');
+ $this->type("{$base}Address", 'Sydney');
+ $this->type("{$base}ZipCode", '2000');
- $this->assertNotVisible('validator1');
+ $this->assertNotVisible("{$base}validator1");
$this->pause(800);
- $this->assertValue('City', 'City: Sydney Zip: 2000');
+ $this->assertValue("{$base}City", 'City: Sydney Zip: 2000');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
index de0ecad8..ee0cde18 100755
--- a/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
@@ -1,19 +1,20 @@
<?php
-class TimeTriggeredCallbackTestCase extends PradoGenericSeleniumTest
+class TimeTriggeredCallbackTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=TimeTriggeredCallbackTest");
- $this->verifyTextPresent("TimeTriggeredCallback + ViewState Tests");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=TimeTriggeredCallbackTest");
+ $this->assertTextPresent("TimeTriggeredCallback + ViewState Tests");
- $this->assertText("label1", "ViewState Counter :");
+ $this->assertText("{$base}label1", "ViewState Counter :");
- $this->click("button1");
+ $this->click("{$base}button1");
$this->pause(8000);
- $this->assertText("label1", "ViewState Counter : 1 2 3 4 5 6 7 8 9 10");
+ $this->assertText("{$base}label1", "ViewState Counter : 1 2 3 4 5 6 7 8 9 10");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
index 5113cc92..e89a65e4 100755
--- a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
@@ -1,20 +1,21 @@
<?php
-class ValueTriggerTestCase extends PradoGenericSeleniumTest
+class ValueTriggerTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ValueTriggerCallbackTest");
- $this->verifyTextPresent("Value Trigger Callback Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ValueTriggerCallbackTest");
+ $this->assertTextPresent("Value Trigger Callback Test");
- $this->assertText('label1', 'Label 1');
+ $this->assertText("{$base}label1", 'Label 1');
- $this->type('text1', 'test');
+ $this->type("{$base}text1", 'test');
$this->pause(2000);
- $this->assertText('label1', 'Old = : New Value = test');
+ $this->assertText("{$base}label1", 'Old = : New Value = test');
- $this->type('text1', 'more');
+ $this->type("{$base}text1", 'more');
$this->pause(3000);
- $this->assertText('label1', 'Old = test : New Value = more');
+ $this->assertText("{$base}label1", 'Old = test : New Value = more');
}
}