Additional fix for chrome WebDriver
@@ -639,6 +639,14 @@ public void clickButtonWithLocator( String locator, boolean wait )
ex = e;
count--;
}
+ try
+ {
+ Thread.currentThread().sleep(500);
+ }
+ catch ( InterruptedException e )
+ {
+ // Ignore
+ }
}
if (ex!=null) {
Assert.fail( message);
@@ -671,16 +679,32 @@ public void clickButtonWithLocator( String locator, boolean wait )
Exception ex = null;
while(count>0)
{
+ if (count<attempts) {
+ try
+ {
+ result = conditions.apply( getWebDriver() );
+ return result;
+ } catch (Exception e) {
+ // Ignore
+ }
+ }
el.click();
try
{
result = wait.until( conditions );
- count=0;
- ex = null;
+ return result;
} catch (Exception e) {
ex = e;
count--;
}
+ try
+ {
+ Thread.currentThread().sleep(500);
+ }
+ catch ( InterruptedException e )
+ {
+ // Ignore
+ }
}
if (ex!=null) {
Assert.fail( message);
