summaryrefslogtreecommitdiff
path: root/tests/test_tools/PradoGenericSelenium2Test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_tools/PradoGenericSelenium2Test.php')
-rwxr-xr-xtests/test_tools/PradoGenericSelenium2Test.php8
1 files changed, 7 insertions, 1 deletions
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)