OnetapInc / chromy

Chromy is a library for operating headless chrome. 🍺🍺🍺
MIT License
605 stars 41 forks source link

How do you target an Iframe that has an element covering it? #93

Open gtwelve opened 6 years ago

gtwelve commented 6 years ago

Hi,

I've been playing around with browser automation using Chromy and have come across an issue where I cannot target an Iframe that has content above it (A modal for example would sit over an Iframe covering it).

The code below looks for the iframe node at a given location. This will resolve as a Div (or another element) when that element is covering the iframe. A new Document is then created referencing the current page not the Iframe.

https://github.com/OnetapInc/chromy/blob/2a84760e651eb5776bbdb29967a9ed97fdbd70ff/src/document.js#L64-L86

I imagine this is an uncommon issue but any help in implementing a workaround would be greatly apprecated.