{"id":30318189,"url":"https://github.com/mherrmann/selenium-python-helium","last_synced_at":"2025-08-17T20:09:35.815Z","repository":{"id":37437315,"uuid":"224234024","full_name":"mherrmann/helium","owner":"mherrmann","description":"Lighter web automation with Python","archived":false,"fork":false,"pushed_at":"2025-04-28T04:40:17.000Z","size":41396,"stargazers_count":7965,"open_issues_count":55,"forks_count":493,"subscribers_count":83,"default_branch":"master","last_synced_at":"2025-08-05T00:29:32.280Z","etag":null,"topics":["chrome","firefox","helium","python","python3","selenium","selenium-python","web-automation","web-scraping","webdriver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mherrmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-26T16:12:28.000Z","updated_at":"2025-08-05T00:14:48.000Z","dependencies_parsed_at":"2023-11-15T08:23:55.027Z","dependency_job_id":"577987ea-4270-4c03-b8c2-f71ca71b85e2","html_url":"https://github.com/mherrmann/helium","commit_stats":{"total_commits":179,"total_committers":10,"mean_commits":17.9,"dds":0.05586592178770955,"last_synced_commit":"9dac6178dc5c1c1e296910153cfbb917a907e2ba"},"previous_names":["mherrmann/helium","mherrmann/selenium-python-helium"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/mherrmann/helium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fhelium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fhelium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fhelium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fhelium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mherrmann","download_url":"https://codeload.github.com/mherrmann/helium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fhelium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270899582,"owners_count":24664720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome","firefox","helium","python","python3","selenium","selenium-python","web-automation","web-scraping","webdriver"],"created_at":"2025-08-17T20:04:05.613Z","updated_at":"2025-08-17T20:09:35.804Z","avatar_url":"https://github.com/mherrmann.png","language":"Python","readme":"# Lighter web automation with Python\n\nHelium is a Python library for automating browsers such as Chrome and Firefox.\nFor example:\n\n![Helium Demo](docs/helium-demo.gif)\n\n## Installation\n\nTo get started with Helium, you need Python 3 and Chrome or Firefox.\n\nI would recommend creating a virtual environment. This lets you install Helium\nfor just your current project, instead of globally on your whole computer.\n\nTo create and activate a virtual environment, type the following commands into\na command prompt window:\n\n```bash\npython3 -m venv venv\n# On Mac/Linux:\nsource venv/bin/activate\n# On Windows:\ncall venv\\scripts\\activate.bat\n```\nThen, you can install Helium with `pip`:\n\n```bash\npython -m pip install helium\n```\n\nNow enter `python` into the command prompt and (for instance) the commands in\nthe animation at the top of this page (`from helium import *`, ...).\n\n## Your first script\n\nI've compiled a [cheatsheet](docs/cheatsheet.md) that quickly teaches you all\nyou need to know to be productive with Helium. For a more complete reference of\nHelium's features, please see the\n[documentation](https://helium.readthedocs.io/en/latest/).\n\n## Connection to Selenium\n\nUnder the hood, Helium forwards each call to Selenium. The difference is that\nHelium's API is much more high-level. In Selenium, you need to use HTML IDs,\nXPaths and CSS selectors to identify web page elements. Helium on the other hand\nlets you refer to elements by user-visible labels. As a result, Helium scripts\nare typically 30-50% shorter than similar Selenium scripts. What's more, they\nare easier to read and more stable with respect to changes in the underlying web\npage.\n\nBecause Helium is simply a wrapper around Selenium, you can freely mix the two\nlibraries. For example:\n\n```python\n# A Helium function:\ndriver = start_chrome()\n# A Selenium API:\ndriver.execute_script(\"alert('Hi!');\")\n```\n\nSo in other words, you don't lose anything by using Helium over pure Selenium.\n\nIn addition to its more high-level API, Helium simplifies further tasks that are\ntraditionally painful in Selenium:\n\n- **iFrames:** Unlike Selenium, Helium lets you interact with elements inside\n  nested iFrames, without having to first \"switch to\" the iFrame.\n- **Window management.** Helium notices when popups open or close and focuses /\n  defocuses them like a user would. You can also easily switch to a window by\n  (parts of) its title. No more having to iterate over Selenium window handles.\n- **Implicit waits.** By default, if you try click on an element with Selenium\n  and that element is not yet present on the page, your script fails. Helium by\n  default waits up to 10 seconds for the element to appear.\n- **Explicit waits.** Helium gives you a much nicer API for waiting for a\n  condition on the web page to become true. For example: To wait for an element\n  to appear in Selenium, you would write:\n  ```python\n  element = WebDriverWait(driver, 10).until(\n      EC.presence_of_element_located((By.ID, \"myDynamicElement\"))\n  )\n  ```\n  With Helium, you can write:\n  ```python\n  wait_until(Button('Download').exists)\n  ```\n\n## Status of this project\n\nI have too little spare time to maintain this project for free. If you'd like\nmy help, please go to my [web site](http://herrmann.io) to ask about my\nconsulting rates. Otherwise, unless it is very easy for me, I will usually not\nrespond to emails or issues on the issue tracker. I will however accept and\nmerge PRs. So if you add some functionality to Helium that may be useful for\nothers, do share it with us by creating a Pull Request. For instructions, please\nsee [Contributing](#Contributing) below.\n\n## How you can help\n\nI find Helium extremely useful in my own projects and feel it should be more\nwidely known. Here's how you can help with this:\n\n- Star this project on GitHub.\n- Tell your friends and colleagues about it.\n- [Share it on Twitter with one click](https://twitter.com/intent/tweet?text=I%20find%20Helium%20very%20useful%20for%20web%20automation%20with%20Python%3A%20https%3A//github.com/mherrmann/helium)\n- Share it on other social media\n- Write a blog post about Helium.\n\nWith this, I think we can eventually make Helium the de-facto standard for web\nautomation in Python.\n\n## Contributing\n\nPull Requests are very welcome. Please follow the same coding conventions as the\nrest of the code, in particular the use of tabs over spaces. Also, read through my\n[PR guidelines](https://gist.github.com/mherrmann/5ce21814789152c17abd91c0b3eaadca).\nDoing this will save you (and me) unnecessary effort.\n\nBefore you submit a PR, ensure that the tests still work:\n\n```bash\npip install -Ur requirements/test.txt\npython setup.py test\n```\n\nThis runs the tests against Chrome. To run them against Firefox, set the\nenvironment variable `TEST_BROWSER` to `firefox`. Eg. on Mac/Linux:\n\n```bash\nTEST_BROWSER=firefox python setup.py test\n```\n\nOn Windows:\n\n```bash\nset TEST_BROWSER=firefox\npython setup.py test\n```\n\nIf you do add new functionality, you should also add tests for it. Please see\nthe [`tests/`](tests) directory for what this might look like.\n\n## History\n\nI (Michael Herrmann) originally developed Helium in 2013 for a Polish IT startup\ncalled BugFree software. (It could be that you have seen Helium before at\nhttps://heliumhq.com.) We shut down the company at the end of 2019 and I felt it\nwould be a shame if Helium simply disappeared from the face of the earth. So I\ninvested some time to modernize it and bring it into a state suitable for open\nsource.\n\nHelium used to be available for both Java and Python. But because I now only\nuse it from Python, I didn't have time to bring the Java implementation up to\nspeed as well. Similarly for Internet Explorer: Helium used to support it, but\nsince I have no need for it, I removed the (probably broken) old implementation.\n\nThe name Helium was chosen because it is also a chemical element like Selenium,\nbut it is lighter.\n","funding_links":[],"categories":["Career Path","Python","UI Testing","Resources"],"sub_categories":["Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmherrmann%2Fselenium-python-helium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmherrmann%2Fselenium-python-helium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmherrmann%2Fselenium-python-helium/lists"}