driver= new InternetExplorerDriver(cap);
driver.get("http://Myurl.com");
WebDriverWait wait= new WebDriverWait(driver,10);
Case 1:wait.until(ExpectedConditions.elementToBeClickable(By.id("Tesr"))); For Above Code driver is waiting for the approx 10 sec before throwing Exception But if use the below code passing WebElement to function" elementToBeClickable" it throw the exception after approx 500 ms
Case 2: wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(By.id("Tesr"))));
Please Anyone tell me why for case 2 driver is not waiting till the timeout value.