-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Element ... is not clickable at point #2866
Conversation
The message "Element is not clickable at point..." gives no information about what element was meant to be clicked, which slows down debugging. This commit adds more information to the error message to the Firefox driver.
The message "Element is not clickable at point..." gives no information about what element was meant to be clicked, which slows down debugging. This commit adds more information to the error message to the Chrome driver.
@@ -259,9 +259,17 @@ webdriver.chrome.isElementClickable = function(elem, coord) { | |||
} | |||
parentElemIter = parentElemIter.parentNode; | |||
} | |||
var elemHTML = elem.outerHTML; | |||
if (elem.hasChildNodes()) { | |||
var inner = elem.innerHTML; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this if block can be reduced to:
elemHTML = elem.outerHTML.replace(elem.innerHTML, '...');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or remove the if block and just have:
var elemHTML = elem.outerHTML.replace(elem.innerHTML, elem.hasChildNodes() ? '...' : '');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukeis I copied the whole block from line 244. Does your reduction apply to that code block as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, yes it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukeis Done. Awaiting further review.
@lukeis Thanks! Which beta will this be released in and when can I expect that beta to appear? |
likely not until 3.0.0 :) I don't think we're doing anymore betas... |
and for chrome, not until the next version of chromedriver |
hi @phoe @lukeis , This issue was headache to me while writing a web scraping script in python , the solution for this came out to be simple , I simply scrolled down(or it could be up in your case) the webpage and then clicking the button worked for , as it turns out if the webdriver is firefox or internet explorer this is not an issue but it's an issue for chrome webdriver . |
@meet-sapu We worked around this issue exactly the same say, but as you said, it's a workaround. Also, I experienced the contrary - this issue manifested itself in Firefox for us. |
The message "Element is not clickable at point..." gives no information about what element was meant to be clicked, which slows down debugging.
This pull request adds more information to the error message to the Firefox driver and the Chrome driver.
X
in the preceding checkbox, I verify that I have signed the Contributor License Agreement