Skip to content
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

firefox: Throw error when element cannot be clicked #1211

Closed

Conversation

p0deje
Copy link
Member

@p0deje p0deje commented Nov 2, 2015

Current behavior is that when element is overlapped by another one,
trying to click it will silent fail because click is happening on
overlapping element. This commit changes the behavior so instead error
is thrown telling that overlapping element would receive click. It makes
the behavior mostly similar to ChromeDriver.

I've implemented this after it was mentioned on IRC that this behavior might make sense and after a bunch of issues were reported (#1202, #1204, #1166).

That is my first time I deal with FirefoxDriver, so the code may not be the best. Also, there is now some duplication with webdriver.chrome.isElementClickable function so maybe it makes sense to DRY it up. Also, since I don't have much experience with Java/JavaScript testing of Selenium, it was easier for me to add regression test in Ruby.

@barancev @lukeis Please, take a look.

Current behavior is that when element is overlapped by another one,
trying to click it will silent fail because click is happening on
overlapping element. This commit changes the behavior so instead error
is thrown telling that overlapping element would receive click. It makes
the behavior mostly similar to ChromeDriver.
@barancev
Copy link
Member

Merged in a240141

@barancev barancev closed this Nov 18, 2015
@vveliev
Copy link

vveliev commented Jan 18, 2016

Is exeption expected when all you need to do is scroll the page. such that element becomes visible ?!

@barancev
Copy link
Member

@vveliev Yes, Selenium scrolls the target element to the view port.

@p0deje p0deje deleted the fxdriver-element-not-clickable branch December 20, 2022 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants