Gemini testing in iFrame

Heyo!

So I’m quite new to automating tests, trying to work through it without guidance other than the internet, which is quite difficult since I’ve only been learning code since April. xD

I’m wondering if anyone here has some experience with trying to get gemini tests to work with iFrames? Using Selenium webdriver. Every time I try to get the test to select the product I’m trying to test, it just says it can’t find it. I realised that this is because the product is served through an iFrame. Searching on the net, I haven’t found any definitive answers, just similar questions to mine that go dead after a while. It seems like there could be an answer here, but I would have no idea where to put that in my code, or how to change the format to match the language I’m writing the tests in.

Is there really no workaround for the iFrame issue when writing tests in Gemini?

Hello @undevelopedbruce!

It might be you are experiencing a design limitation of browsers to prevent communication between the main window and iFrames. If I recall correctly, unless the domain of the iFrame is similar to the main window, many browsers will prevent that communication.

What you might try is loading the URL used for the iFrame in a separate browser. In that manner, you could inspect the content that would be in an iFrame.

Joe

That’s a great suggestion. I ended up doing this, then finding out that the product makes its own iFrame on load, which isn’t helpful so no matter where you try to load the content, it builds itself an iFrame.

However, I was able to find a selector that worked in capturing the entire product when viewing it on its own, even if I can’t reach inside, so thank you :relieved: