Selenium: Unable to click on an element which is inside of iFrame(even after switching in frame)

Created on 24 Sep 2018  路  8Comments  路  Source: SeleniumHQ/selenium

Meta -

OS:
Windows 7

Selenium Version:
WebDriver 3.9.1

Browser:
Chrome and Firefox

Browser Version:
Chrome: 66.0.3359.181 (64-bit)
chromedriver v2.40

Firefox: 62.0.02 (64-bit)
gecko: 0.20.1

Expected Behavior -

WebDriver should click on button which is under iFrame.

Actual Behavior -

Click() method is executing successfully(no exception throwing) but in UI there is no click happening.

Steps to reproduce -

Unzip attached project and run the console application.
ConsoleApplication1.zip

D-IE

Most helpful comment

Thanks @barancev for the analysis.

Gecko driver issue can be find here:
https://github.com/mozilla/geckodriver/issues/1389

Chromedriver issue can be found here:
https://bugs.chromium.org/p/chromedriver/issues/detail?id=2605&q=&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary

All 8 comments

If we make navigation url = "iframe html page" for driver, in that case click is happening properly.

And where is the "newLogin.html" file?

... and the "contentFrame.html" file too

These files can be found in debug folder of attached project, if you are running test in release mode, then both the files need to copy in release folder from debug folder.

Ah, I see, sorry.

style="transform-origin: 0px 0px 0px; transform: scale(1.13, 1.13);" -- that's the reason, this transformation breaks drivers' ability to calculate element position properly.

Please log bugs in
https://github.com/mozilla/geckodriver/issues
https://bugs.chromium.org/p/chromedriver/issues/list
this issue should be fixed on the drivers' side.

I'll keep the issue open here because it should be fixed in IE driver too.

Thanks @barancev for the analysis.

Gecko driver issue can be find here:
https://github.com/mozilla/geckodriver/issues/1389

Chromedriver issue can be found here:
https://bugs.chromium.org/p/chromedriver/issues/detail?id=2605&q=&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary

is anyone facing this issue still?

is anyone facing this issue still?

yes, try to login into reddit, the inputs are filled properly but the sign in button doesn't click.

Was this page helpful?
0 / 5 - 0 ratings