Sahas
Sahas

Reputation: 3186

Element is not clickable at point

I've a simple scenario that searches for a product in Google and applies some filters. Here, while applying the second filter, it needs to wait before the first filter process selection completes.

For example, I search for "Galaxy" in Google,from the results page, navigate to Shopping, filter "Samsung Note" and apply second fitter "New items".

It always fails with below error while trying to apply the second filter.

 Error: unknown error: Element is not clickable at point (78, 445). Other element would receive the click: <div id="flyr" class="flyr-o" style="width: 927px; height: 5012px; top: 120px;"></div>

I could do setTimeout() and 1000s delay, it works fine. However, putting this handcrafted wait is one of the bad practices in GUI automation, will make the test non-deterministic. What's the best way to handle this with webdriver.io.

PS: I've tried all waitFor* commands including waitUntil, nothing seems to help.

Upvotes: 1

Views: 2112

Answers (1)

Brine
Brine

Reputation: 3731

I ran your test manually, and found the div#flyr block, hidden, at the bottom of the page. I'm not sure what it is, or when it hides, but you'll need to wait it out. This should wait till it's hidden (1000ms).

browser.waitForVisible(`div#flyr`, 1000, true);

Upvotes: 1

Related Questions