From a3c0634e2ae3aac209cf6d645df4b1791a745542 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 2 Jun 2006 17:52:02 +0000 Subject: Fix of some FT due to the change of selenium. --- tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php | 6 +++--- .../FunctionalTests/quickstart/Controls/MultiViewTestCase.php | 8 ++++---- .../FunctionalTests/validators/tests/RequiredListTestCase.php | 11 +++++------ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php index c031c5fd..7ed2b10f 100644 --- a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php @@ -42,12 +42,13 @@ class ListBoxTestCase extends SeleniumTestCase $this->verifySelectOptions("ctl0\$body\$ctl7[]","item 1,item 2,item 3,item 4"); // multiselection list box's behavior upon postback - $this->select("ctl0\$body\$ListBox2[]", "label=item 3"); + $this->addSelection("ctl0\$body\$ListBox2[]", "label=item 3"); $this->clickAndWait("name=ctl0\$body\$ctl8", ""); $this->verifyText("ctl0_body_MultiSelectionResult2","Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 3, Value: value 4, Text: item 4)"); // Auto postback multiselection list box - $this->selectAndWait("ctl0\$body\$ctl9[]", "label=item 1"); + $this->addSelection("ctl0\$body\$ctl9[]", "label=item 1"); + $this->waitForPageToLoad(1000); $this->verifyText("ctl0_body_MultiSelectionResult","Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)"); // Databind to an integer-indexed array @@ -73,7 +74,6 @@ class ListBoxTestCase extends SeleniumTestCase // List box causing validation $this->verifyNotVisible('ctl0_body_ctl12'); $this->select("ctl0\$body\$VListBox2", "label=Agree"); -// $this->pause(1000); $this->verifyVisible('ctl0_body_ctl12'); $this->type("ctl0\$body\$TextBox", "test"); $this->selectAndWait("ctl0\$body\$VListBox2", "label=Disagree"); diff --git a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php index c94a325c..90f67901 100644 --- a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php @@ -9,8 +9,8 @@ class MultiViewTestCase extends SeleniumTestCase $this->verifyTitle("PRADO QuickStart Sample", ""); // view 1 : type in a string - $this->verifyNotVisible('ctl0_body_Result1'); - $this->verifyNotVisible('ctl0_body_Result2'); + $this->verifyElementNotPresent('ctl0_body_Result1'); + $this->verifyElementNotPresent('ctl0_body_Result2'); $this->type('ctl0_body_Memo','test'); $this->clickAndWait('ctl0$body$ctl1'); @@ -20,8 +20,8 @@ class MultiViewTestCase extends SeleniumTestCase $this->clickAndWait('ctl0$body$ctl7'); // view 2 : update dropdownlist - $this->verifyNotVisible('ctl0_body_Result1'); - $this->verifyNotVisible('ctl0_body_Result2'); + $this->verifyElementNotPresent('ctl0_body_Result1'); + $this->verifyElementNotPresent('ctl0_body_Result2'); $this->select('ctl0$body$DropDownList', "label=Blue"); $this->clickAndWait('ctl0$body$ctl4'); diff --git a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php index cb10f201..23e0f045 100644 --- a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php +++ b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php @@ -7,14 +7,13 @@ class RequiredListTestCase extends SeleniumTestCase { $base = "ctl0_Content_"; $this->open("validators/index.php?page=RequiredListValidator"); - $this->assertLocation("index.php?page=RequiredListValidator"); $this->click("{$base}submit1"); $this->assertVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); $this->assertVisible("{$base}validator3"); $this->click("{$base}list1_c0"); - $this->select("{$base}list2", "label=One"); - $this->select("{$base}list2", "label=Two"); + $this->addSelection("{$base}list2", "label=One"); + $this->addSelection("{$base}list2", "label=Two"); $this->click("{$base}list3_c3"); $this->clickAndWait("{$base}submit1"); $this->assertNotVisible("{$base}validator1"); @@ -23,14 +22,14 @@ class RequiredListTestCase extends SeleniumTestCase $this->click("{$base}list1_c1"); $this->click("{$base}list1_c2"); $this->click("{$base}list1_c3"); - $this->select("{$base}list2", "label=Two"); + $this->addSelection("{$base}list2", "label=Two"); $this->click("{$base}list1_c3"); - $this->click("{$base}submit1"); + $this->clickAndWait("{$base}submit1"); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); $this->assertNotVisible("{$base}validator3"); $this->click("{$base}list3_c3"); - $this->click("{$base}submit1"); + $this->clickAndWait("{$base}submit1"); $this->pause(200); $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); -- cgit v1.2.3