How can I extract data from an iFrame?
Many older websites still use iFrames to embed a webpage inside another. When you are recording a task, if you interact with an element on the page that is within an iFrame, you will see the error:
"This element is inside an iFrame. iFrame interactions are not supported in Browse AI recordings yet."
In this article, we will talk about a workaround for this limitation that works most of the time.
How to find a direct link to the webpage inside the iFrame
Most of the time, the webpage inside an iFrame has a URL through which it can be accessed directly without the use of iFrames. In order to find this direct link, you need to
- Close the recording window,
- Open the webpage in a regular Chrome window,
- Right-click somewhere in the iFrame (the same area where you clicked and got the Browse AI error),
- Press Inspect. This will open Chrome Inspector panel and highlight the element you right-clicked on:
- Scan the lines above the highlighted line until you find the line that starts with `<iframe `:
- In that line, there is usually a `src="..."` attribute. The text inside the quotation marks in front of `src=` is highlighted blue. Right-click on this text and press Open in new tab.
Note: If you can't find `src`, this work-around probably would not work for this iFrame.
Voilà! You just opened the page inside the iFrame directly. Now you can just record a task on this page and train your new Browse AI robot.
In our experience, this work-around works for over 95% of iFrames people come across. If your use-case falls within the other 5%, but it's an important use case and there is a large volume of data that can only be accessed through the iFrame, contact our support team and they will do their best to assist.