Re: How to check with Selenide that an element can be interacted with and is not covered by another element?

1,430 views
Skip to first unread message

andrei....@gmail.com

unread,
Apr 27, 2015, 4:27:35 AM4/27/15
to Risko Ruus, Mihhail Lapuškin
1. You are right, screenshot is not taken in this case. This bug is fixed in selenide 2.18 that will be released in few days.

2. If you know id or class of loader layer, you can write $("#loader").should(disappear);

Sent from my HTC

----- Reply message -----
From: risko...@gmail.com
To: <sele...@googlegroups.com>
Subject: How to check with Selenide that an element can be interacted with and is not covered by another element?
Date: Mon, Apr 27, 2015 10:55

Hi,

Sometimes another element e.g. a half-transparent loader bar is displayed and I cannot click some other element because the overlay element would receive the click instead. $.waitUntil(Condition.visible, 10000) would not work in this case, because the element is indeed visible, but it cannot be clicked yet. What would be the best solution here to check that an element becomes clickable?

Also I've noticed that if such error happens during the test then the screenshot is not taken by Selenide. I might be wrong, but I don't see the screenshot location in the console log.

Thanks


Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken
Build info: version: '2.43.0', revision: 'accb3003b9fb8f7cae30f9669b4c594a065396a6', time: '2014-09-09 22:22:51'
System info: host: 'ci', ip: '172.24.161.63', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-504.el6.x86_64', java.version: '1.7.0_75'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:136)
... 32 more
Caused by: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (1369, 427). Other element would receive the click: <div class="text-right">...</div>

-- 
You received this message because you are subscribed to the Google Groups "selenide" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenide+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

risko...@gmail.com

unread,
Apr 27, 2015, 4:40:11 AM4/27/15
to sele...@googlegroups.com, risko...@gmail.com
1. Thank you for the fix regarding the screenshot problem.
2. So far I've used the same approach, but I have to put $("#loader").should(disappear); in quite many places and thought just to ask whether there was a way to do something like this:
$("elemToBeClicked").waitUntil(clickable, 10000).click()

andrei....@gmail.com

unread,
Apr 27, 2015, 5:17:10 AM4/27/15
to Risko Ruus, Mihhail Lapuškin, Risko Ruus
I realized now that selenide 2.18 will resolve your problem automatically. In 2.18 we changed the "waiting" algorithm: now selenide will try to click element until it succeeds (but no more than 4 seconds).
Reply all
Reply to author
Forward
0 new messages