Skip to content

firefox: Throw error when element cannot be clicked#1211

Closed
p0deje wants to merge 1 commit intoSeleniumHQ:masterfrom
p0deje:fxdriver-element-not-clickable
Closed

firefox: Throw error when element cannot be clicked#1211
p0deje wants to merge 1 commit intoSeleniumHQ:masterfrom
p0deje:fxdriver-element-not-clickable

Conversation

@p0deje
Copy link
Copy Markdown
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.
@p0deje p0deje force-pushed the fxdriver-element-not-clickable branch from db54e14 to 51bef0c Compare November 2, 2015 06:11
@p0deje p0deje added Z-awaiting review Archived: use GitHub review assignments D-firefox labels Nov 2, 2015
@barancev
Copy link
Copy Markdown
Member

Merged in a240141

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

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
Copy Markdown
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

Labels

D-firefox Z-awaiting review Archived: use GitHub review assignments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants