Intro guide: using helium (python Selenium wrapper) with Robin

The incentive being this thread re clicking iframe elements by xpath, I searched for tools and found Helium, recently open-sourced by the author.

From the Github page:

iFrames: Unlike Selenium, Helium lets you interact with elements inside nested iFrames, without having to first “switch to” the iFrame.”

Just what I was looking for! This is for python, so you’ll need that installed to use Helium.

You can use jQuery-like syntax if you want, see the cheatsheet.

Here’s an HTML page you can save on your local file system to experiment with (I refer to it as ‘iframe.html’ for the rest of this guide):

My iFrame example
An iframe from an external source is below.
<iframe name="Framename" src="" width="550" height="550" frameborder="0" scrolling="yes" style="width: 100%;"> </iframe> 
Now try to click on elements inside the iframe from Robin.

First, some screenshots of the Python scripts (one for XPath, one for CSS).

For XPath (verbose xpath courtesy of this link, converted from easy CSS below:

Same script, but using CSS for selector:


And the Robin script that calls the Python. I’ve used ‘’ for the XPath script, ‘’ for the CSS script.

This demo loads the HTML page with an external iframe, clicks on an element within the iframe to load another frame, then grabs some text from an element.

Disclaimer: I have no relationship whatsoever to the webpage used for the external iframe, or to its authors.