public static void wait (WebDriverWait wait,By by,String state,String description)
{
// LogUtil.debugLog("begin wait.............."+description);
if("click".equals(state)){
wait.until(ExpectedConditions.elementToBeClickable(by));
}
if("visibility".equals(state)){
wait.until(ExpectedConditions.visibilityOfElementLocated(by));
}
if("invisibility".equals(state)){
wait.until(ExpectedConditions.invisibilityOfElementLocated(by));
}
// LogUtil.debugLog("success wait.............."+description);
}