-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛 Bug]: elementToBeClickable wait condition fails on elements with opacity 0 #15025
Comments
@ysiivan, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
@ysiivan Before starting the discussion on this again, please provide a valid exampe page and some code to reproduce this. Without a concrete example it is hard to tell what is the correct way of dealing with things. |
Hi, @ysiivan. Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue. Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough. Reply to this issue when all information is provided, thank you. |
@joerg1985 The app I encountered this with is not publicly accessible. I'll see if I can something else to demonstrate. |
@joerg1985 Attached is a static html file (zipped) that demonstrates the issues:
var element = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(by)); Which fails for either of the two checkboxes on the page. The wait delegate uses
Both controls are visible on the page and can be clicked on manually. |
This bug is hard to fix. |
What happened?
The condition to evaluate the "clickability" of an element considers whether the element is
Displayed
, which does not regard elements with an opacity of 0 asDisplayed
.The proposal in the closed 14030 was to make
Displayed
disregard the opacity. I understand the arguments on both sides. However at the end of the day, the actual problem is still not resolved - waiting for "clickability", as it is now, is unreliable. The original post was about React, I just encounter the issue in an Angular app. Clickjacking or not, it seems the technique is apparently being used. I can't judge whether this is a right or a wrong way of doing things, but so should not Selenium.All this aside - the bottom line is - opacity does not play a role in "clickability".
If
Displayed
is to stay as it is, then how can we properly ascertain "clickability"?I'm not the best at reading minified javascripts, but it seems
is-displayed.js
"atom" is already wired to take an optional parameter for ignoring opacity. Perhaps expose a way to use that?How can we reproduce the issue?
Relevant log output
Operating System
N/A
Selenium version
N/A
What are the browser(s) and version(s) where you see this issue?
Chrome
What are the browser driver(s) and version(s) where you see this issue?
130.x.x.x
Are you using Selenium Grid?
No
The text was updated successfully, but these errors were encountered: