Selenia
github.com/penielny/selenia- Category
- Developer Tools
- Rank
- No. 2192Tools index
- Pricing
- Open Source
- Type
- TOOL
- GitHub
- 3 stars
- Latest release
- selenia-0.3.1
- Date
About
Selenia is a Python library that finds Selenium elements from plain-English descriptions such as "the login button". A 24 MB local ranking model scores the real elements on the page and returns the best match as a normal WebElement, so no LLM or API key is needed. It raises an error when nothing fits or when two elements fit equally well, instead of guessing.
At a glance
Selenia is an MIT-licensed Python library that finds Selenium elements from plain-English descriptions such as "the login button". A 24 MB fine-tuned ranking model runs locally, scores the page's real elements against your description and returns a normal WebElement. It never writes a selector, and it raises an error instead of guessing when nothing fits or two elements tie.
Good fit
Teams with existing Selenium tests whose XPath or CSS locators break after front-end changes, and who need runs to stay offline, free per call and repeatable in locked-down CI. On the author's held-out set of 161 queries from unseen sites, the shipped model picked the right element first 89.4% of the time and within the top three 96.3%, at about 20 to 35 ms per find on an M1 laptop CPU.
Consider something else when
You want an agent that plans multi-step tasks on its own; the README points you to LLM browser agents for that. Also look elsewhere if your suite uses Playwright or Cypress rather than Selenium, or if roughly one wrong first pick in ten on unfamiliar pages is too many for your tests.
Start here
Run pip install selenia, wrap your driver with selenia = Selenia(driver), and replace one brittle locator with selenia.find("password field"). The first call downloads the model to ~/.cache/selenia and verifies its checksum. If find raises, the message names the candidate elements, so you can sharpen the description.
Cost and requirements
Free, with no API key or per-call cost. Needs Python 3.10 or later, Selenium, onnxruntime, tokenizers and numpy, but not PyTorch. The model downloads once from the project's GitHub release, or from your own mirror via SELENIA_MODEL_URL, and then runs offline.
Limits to know
Version 0.3.1 is marked beta, and the accuracy figures are the author's own. iframes are not searched, so switch into the frame first; open shadow DOM is covered. By default a match needs a score of 0.5 and a 0.05 lead over the runner-up, adjustable through LocalRanker. The training pipeline is included for retraining on your own screens.
Sources checked 2026-11-26. Source-based assessment.
Why it made the leaderboard
Gives existing Selenium suites self-healing locators that are deterministic, offline and free per call, unlike LLM browser agents.
Similar tools
Tags
Tech Stack
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.