summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php2
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php1
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php1
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php2
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php1
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket205TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket207TestCase.php2
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket700TestCase.php1
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket719TestCase.php2
-rwxr-xr-xtests/test_tools/PradoGenericSelenium2Test.php8
10 files changed, 17 insertions, 5 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
index 421c259d..9d5b93b0 100755
--- a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
@@ -11,7 +11,7 @@ class ValueTriggerTestCase extends PradoGenericSelenium2Test
$this->assertText("{$base}label1", 'Label 1');
$this->type("{$base}text1", 'test');
- $this->pause(2000);
+ $this->pause(3000);
$this->assertText("{$base}label1", 'Old = : New Value = test');
$this->type("{$base}text1", 'more');
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php
index 66630581..ee9bd504 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php
@@ -107,6 +107,7 @@ class QuickstartDataGrid5TestCase extends PradoGenericSelenium2Test
$this->type("ctl0\$body\$PageButtonCount", "10");
$this->byName("ctl0\$body\$ctl6")->click();
+ $this->pause(50);
$this->type("ctl0\$body\$PageSize", "2");
$this->pause(50);
$this->byName("ctl0\$body\$ctl8")->click();
diff --git a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php
index 091b3db8..4dbc19de 100755
--- a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php
@@ -20,6 +20,7 @@ class QuickstartMultiViewTestCase extends PradoGenericSelenium2Test
$this->assertSourceContains('Your text input is: test');
$this->assertSourceContains('Your color choice is: Red');
$this->byName('ctl0$body$ctl7')->click();
+ $this->pause(50);
// view 2 : update dropdownlist
$this->assertElementNotPresent('ctl0_body_Result1');
diff --git a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php
index 3865e33d..0e9fa4db 100755
--- a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php
@@ -49,6 +49,7 @@ class QuickstartTextBoxTestCase extends PradoGenericSelenium2Test
// SafeText
$this->assertText("ctl0_body_Output","test");
$this->typeSpecial("ctl0\$body\$TextBox2","<a href=javascript:xxx>malicious code</a>");
+ $this->pause(50);
$this->assertText("ctl0_body_Output","malicious code");
// password
@@ -83,7 +84,6 @@ End of message
// textbox associated with a validator
$this->assertNotVisible('ctl0_body_ctl15');
$this->typeSpecial("ctl0\$body\$MultiTextBox3", "demo");
-// $this->pause(1000);
$this->assertVisible('ctl0_body_ctl15');
$this->typeSpecial("ctl0\$body\$MultiTextBox3", "non demo");
$this->assertNotVisible('ctl0_body_ctl15');
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php
index 469fbf5a..33a8b769 100755
--- a/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php
@@ -7,6 +7,7 @@ class QuickstartWizard4TestCase extends PradoGenericSelenium2Test
$this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample4&amp;notheme=true&amp;lang=en");
$this->assertEquals("PRADO QuickStart Sample", $this->title());
+ $this->pause(100);
// step 1
$this->assertSourceContains('Step 1 of 3');
diff --git a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
index 0c3b93b0..3abfcca8 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
@@ -13,7 +13,7 @@ class Ticket205TestCase extends PradoGenericSelenium2Test
$this->type("{$base}textbox1", "test");
$this->byId("{$base}button1")->click();
- $this->pause(50);
+ $this->pause(100);
$this->assertEquals("error", $this->alertText());
$this->acceptAlert();
diff --git a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
index cc993192..b9fbae5d 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
@@ -11,6 +11,7 @@ class Ticket207TestCase extends PradoGenericSelenium2Test
$this->assertNotVisible("{$base}validator2");
$this->byId("{$base}button1")->click();
+ $this->pause(50);
$this->assertEquals('error on text1 fired', $this->alertText());
$this->acceptAlert();
@@ -31,6 +32,7 @@ class Ticket207TestCase extends PradoGenericSelenium2Test
$this->assertVisible("{$base}validator2");
$this->byId("{$base}button1")->click();
+ $this->pause(50);
$this->assertEquals('error on text1 fired', $this->alertText());
$this->acceptAlert();
diff --git a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
index ec6d7783..788fa383 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
@@ -50,6 +50,7 @@ class Ticket700TestCase extends PradoGenericSelenium2Test
$this->type('ctl0_Main_Username','AdminUser');
$this->type('ctl0_Main_Password','demo');
$this->byId('ctl0_Main_LoginButton')->click();
+ $this->pause(50);
$this->byId('pageAdminUsersHome')->click();
$this->assertTitleEquals('admin.users.Home');
$this->assertSourceContains('|Param1: Set at admin|');
diff --git a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
index 73ecaecc..03811b11 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
@@ -17,7 +17,7 @@ class Ticket719TestCase extends PradoGenericSelenium2Test
$this->byId("${base}autocomplete")->click();
$this->keys('f');
- $this->pause(500);
+ $this->pause(800);
$this->assertSourceContains('Finland');
$this->keys('r');
diff --git a/tests/test_tools/PradoGenericSelenium2Test.php b/tests/test_tools/PradoGenericSelenium2Test.php
index 535d500d..33ab21e1 100755
--- a/tests/test_tools/PradoGenericSelenium2Test.php
+++ b/tests/test_tools/PradoGenericSelenium2Test.php
@@ -93,7 +93,13 @@ class PradoGenericSelenium2Test extends PHPUnit_Extensions_Selenium2TestCase
protected function assertValue($id, $txt)
{
- $this->assertEquals($txt, $this->getElement($id)->value());
+ try{
+ $this->assertEquals($txt, $this->getElement($id)->value());
+ } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) {
+ //stale element reference. try second time.
+ $this->pause(50);
+ $this->assertEquals($txt, $this->getElement($id)->value());
+ }
}
protected function assertVisible($id)