From bdfd9f07f17de1751a7e4d94940acb426af4be77 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 6 Aug 2015 18:12:45 +0200 Subject: Fix tests work around stale references by explicitly waiting --- .../quickstart/Controls/RadioButtonTestCase.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php') diff --git a/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php index 214b1596..7dfff756 100755 --- a/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php @@ -15,11 +15,11 @@ class QuickstartRadioButtonTestCase extends PradoGenericSelenium2Test $this->byXPath("//input[@name='ctl0\$body\$ctl1' and @value='value']")->click(); // an auto postback radiobutton - $this->assertNotContains("I'm clicked", $this->source()); + $this->assertSourceNotContains("I'm clicked"); $this->byXPath("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']")->click(); - $this->assertContains("I'm clicked", $this->source()); + $this->assertSourceContains("I'm clicked"); $this->byXPath("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']")->click(); - $this->assertContains("I'm clicked", $this->source()); + $this->assertSourceContains("I'm clicked"); // a radiobutton causing validation on a textbox $this->assertNotVisible('ctl0_body_ctl3'); @@ -27,7 +27,7 @@ class QuickstartRadioButtonTestCase extends PradoGenericSelenium2Test $this->pause(1000); $this->assertVisible('ctl0_body_ctl3'); $this->byXPath("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']")->click(); - $this->pause(1000); + $this->pause(500); $this->assertVisible('ctl0_body_ctl3'); $this->type("ctl0\$body\$TextBox", "test"); $this->byXPath("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']")->click(); @@ -44,13 +44,13 @@ class QuickstartRadioButtonTestCase extends PradoGenericSelenium2Test // a radiobutton group $this->byName("ctl0\$body\$ctl7")->click(); - $this->assertContains("Your selection is empty", $this->source()); + $this->assertSourceContains("Your selection is empty"); $this->byXPath("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio2']")->click(); $this->byName("ctl0\$body\$ctl7")->click(); - $this->assertContains("Your selection is 2", $this->source()); + $this->assertSourceContains("Your selection is 2"); $this->byXPath("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio3']")->click(); $this->byXPath("//input[@name='ctl0\$body\$Radio4' and @value='ctl0\$body\$Radio4']")->click(); $this->byName("ctl0\$body\$ctl7")->click(); - $this->assertContains("Your selection is 34", $this->source()); + $this->assertSourceContains("Your selection is 34"); } } -- cgit v1.2.3