iFrame to iFrame

Published on
March 3, 2022
Tessa McDaniel
Marketing Team Lead

Tessa returns with the not-so-secret knowledge of how to get Virtuoso to switch between iFrames and the main page!

Hey, everyone! Do you know what an iFrame is? I definitely did not before I started, I just knew that when I tried to get Virtuoso to fill in a form on our demo page, it didn’t work. A little tinkering around, and I discovered iFrames! 

Because our Book a Demo page has an iFrame form on it, I figured it would be a good place to practice my newfound skill. So, I started off by navigating to the page and asking Virtuoso to type my first name into the form. Of course, Virtuoso couldn’t find the form, so that step failed. So I just added a step that told it to “switch iframe to ‘iframe’” and bing bang boom, it worked! Then to switch back to the main page, I had Virtuoso “switch to parent frame.” 

What if you’re testing a website with multiple iFrames? So this bit isn’t a Virtuoso trick, but I had to learn it so it might help some of you out there. I Inspected the demo page and ctrl + F’ed to find all the code that mentioned an iframe. The line I was looking for was the one that mentioned the iFrame’s ID, so I used that ID in the Virtuoso step instead of just calling it an iFrame. 

So, that’s really all there is to it. It’s a short, simple feature, but one that I feel is important to talk about. Before I knew iFrames were a thing, I was really frustrated that my tests interacting with forms weren’t working. But now I know, and maybe I can save you guys some frustration too! See you all in the next post! (and if you’re interested in seeing Virtuoso interact with iFrames on your site, click here!)

Subscribe to our Newsletter