explaingit

mherrmann/helium

8,288PythonAudience · developerComplexity · 2/5Setup · easy

TLDR

A Python library that simplifies browser automation by letting you click buttons and fill forms using visible text labels instead of HTML IDs or XPath, making Selenium scripts 30, 50% shorter to write.

Mindmap

mindmap
  root((helium))
    What it does
      Simplified browser automation
      Wrapper around Selenium
      30-50 percent shorter scripts
    Tech Stack
      Python
      Selenium
      Chrome
      Firefox
    Features
      Text-based element finding
      Auto iFrame handling
      Popup window management
      Implicit waits
    Audience
      Python developers
      QA engineers
      Web scrapers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Automate web form submissions and button clicks by referring to elements by their visible label text instead of XPath expressions.

USE CASE 2

Write browser automation scripts that are 30, 50% shorter than equivalent raw Selenium code.

USE CASE 3

Automate pages with iFrames or popup windows without manually switching browser context.

USE CASE 4

Add forgiving implicit waits to browser scripts so they stop failing when elements take a moment to load.

Tech stack

PythonSeleniumChromeFirefox

Getting it running

Difficulty · easy Time to first run · 5min

Install with pip install helium, requires Chrome or Firefox already installed on the machine.

In plain English

Helium is a Python library for automating web browsers. It sits on top of Selenium, the standard tool for browser automation, but provides a much simpler interface. Where Selenium requires you to locate page elements using technical identifiers like HTML element IDs, XPath expressions, or CSS selectors, Helium lets you refer to things by the text a user actually sees on the screen. For example, you can click a button by writing click("Submit") rather than hunting for an XPath to that button. The practical result is that Helium scripts tend to be 30 to 50 percent shorter than the equivalent Selenium scripts. Because Helium is just a wrapper around Selenium, you can mix the two freely in the same script. Anything Helium does not cover, you can do with the underlying Selenium driver. Beyond the simpler API, Helium also removes some of Selenium's common pain points. It handles iFrames transparently, so you do not need to "switch to" a nested frame before interacting with elements inside it. It manages popup windows automatically, focusing them as they open and returning to the previous window when they close. It also adds sensible implicit waits: rather than failing immediately if an element has not yet loaded, Helium waits up to 10 seconds by default. For explicit waits, the API is much cleaner than Selenium's verbose alternative. Installation requires Python 3 and Chrome or Firefox. Install with pip (pip install helium). The repository includes a cheatsheet and links to full documentation at helium.readthedocs.io. The project was originally built in 2013 for a startup and open-sourced in 2019 when that company closed. The author notes limited time for maintenance and does not regularly respond to issues, but does review and merge pull requests. The name Helium was chosen because, like Selenium, it is a chemical element, and it is lighter.

Copy-paste prompts

Prompt 1
Using helium, write a Python script that opens a login page, types into the username and password fields by their label, and clicks the Sign In button.
Prompt 2
Show me how to use helium to scrape a table from a page that loads data dynamically after clicking a filter dropdown.
Prompt 3
Write a helium script that handles a file download popup in Chrome and saves the file to a specific local folder.
Prompt 4
How do I mix helium API calls with raw Selenium WebDriver calls in the same script when I need something helium doesn't support?
Prompt 5
Give me a helium automation script that fills out a multi-step web form, including a dropdown selection and a checkbox.
Open on GitHub → Explain another repo

← mherrmann on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.