Passing locator Arguments using "By" class
Passing locator in Selenium before its existence .(small snippet below)
public static void main(String args[])
{
Lib base_Library=new base_Library();
base_Library.wait_to_load(By.id("templateCombobox"));
}
public void wait_to_load(By by){
WebDriverWait wait = new WebDriverWait(driver,10); wait.until(ExpectedConditions.elementToBeClickable(by));
}
}
No comments:
Post a Comment