1
votes

I want to use implicit or explicit wait in my code. But it is not working with chrome driver. Is any special patch is available to work? But same is worked with firefoxdriver.

My application supports only chrome so I don't have a choice to use other browser. Please help me how can I use - wait - to load the element or any other solution is available?

2
Both wait supports chrome , what error you getting and what is actual issue? - Helping Hands
Error message -org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (322, 546). Other element would receive the click: <div class="progress_bg">...</div> (Session info: chrome=42.0.2311.135) - babu
can you please put your that whole part html code by update your question please? - Helping Hands
From your error message it is clear that the element you are trying to click is in a modal dialog / window. Thats why other element is getting click. - Vivek Singh

2 Answers

0
votes

Use Explicit wait as per below way :

 WebElement Element = (new WebDriverWait(driver, 30))
              .until(ExpectedConditions.elementToBeClickable(By.className("progress_bg")));

Element.click();

You can use Id , Xpath or any other locator for element. I have used class in above as per your comment.

-1
votes

Explicit wait

WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); 

IWebElement myDynamicElement = wait.Until<IWebElement>((d) => { return d.FindElement(By.Id("someDynamicElement")); });

Implicit wait

driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));

Plus, try to download the latest version of ChromeDriver- https://code.google.com/p/selenium/wiki/ChromeDriver

And update the WebDriver NuGet to the latest available version- 2.45 I think.

All of my tests on Chrome are working just fine following these steps.