Quality is delighting customers
Hi All ,Created method as
public void WaitForElementById(WebDriver driver, String locator)throws Exception {
try {
int i = 0;
for (i = 1; i < 5;) {
if (driver.findElement(By.id(driver, By.id(locator))))
{// driver.FindElement(By.LinkText(locator)).Click();
break;
}
else {
Thread.sleep(2000);
i++;}}
}
catch (Exception e) {
}
}
Showing error as '
The method id(String) in the type By is not applicable for the arguments (WebDriver, By)'
Please guide
Tags:
Manager QA at IdeaS Revenue Optimization
© 2013 Created by Quality Testing.