w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
678 stars 193 forks source link

Element Click unable to interact with element in <iframe> that is outside viewport #1141

Open andreastt opened 6 years ago

andreastt commented 6 years ago

The Element Click command is currently unable to interact with (hit) elements inside <iframe>s that are outside the viewport because it does not bring the <iframe> into view first. This is because Element.scrollIntoView on the element inside the frame only moves the viewport of the frame.

This bug was reported on geckodriver, so see https://github.com/mozilla/geckodriver/issues/1039 for more details.

andreastt commented 6 years ago

I suspect we need to find out if the target web element is inside a frame, then first scroll all of its parent frame elements into view recursively.

Gitrrrr commented 6 years ago

Any guess when this issue will fix?

shs96c commented 6 years ago

Do we need to iteratively move through each viewport, from that closest to the element to the top-level one, attempting to scroll the element into view?

whimboo commented 5 years ago

If browsers have implemented the browsing contexts spec there would be a browsing context tree, which could be iteratively moved up via the parent browsing context. I think the relevant part of the spec should be https://html.spec.whatwg.org/multipage/browsers.html#windows:browsing-context-10

whimboo commented 4 years ago

@shs96c and @AutomatedTester do you have any feedback to my last comment? Would that be a plausible operation?