By loaderSpinner = By.xpath("");
maxRetryCount = 20
=========================================
if (checkElementPresence(loaderSpinner)) {
int retryCount = 0;
while (checkElementPresence(loaderSpinner) == true
&& retryCount < Integer.parseInt(props.getProperty("maxRetryCount"))) {
retryCount++;
}
}
=========================================
//Method to find presence of element
public static boolean checkElementPresence(By by){
try{
if (driver.findElements(by).size() != 0){
logger.info("The element is present "+by.toString());
return true;
}else{
logger.info("The element not present "+by.toString());
}
}catch (Exception e){
logger.error(e);
Assert.fail();
}return false;
}
=========================================
Thanks
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a0e2cee3-9714-401b-b4a8-0169cee0b16e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.