In the world of browser automation, the hardest part isn’t clicking buttons or typing into inputs — it’s knowing what to interact with.
That’s why we built ActionChain: a natural language-driven way to locate and operate on DOM elements using AI.
🤖 What is ActionChain?
The biggest frustration in web automation is this:
UI changes constantly, but your code shouldn’t have to.
That's where ActionChain shines — it keeps your logic stable even when the HTML shifts.
ActionChain
is a lightweight, fluent API built on top of talk2dom
, a tool that lets you locate elements by describing them in plain English:
ActionChain(driver) \
.find("Find the login button") \
.click() \
.wait(1) \
.find("Type your email") \
.type("user@example.com") \
.find("Type your password") \
.type("123456") \
.find("Submit login") \
.click()
Each .find()
call uses an LLM under the hood to return the best selector (CSS or XPath), even across dynamic layouts and real-world websites.
🧠 Why it matters
Traditional selectors tie your automation to a brittle structure.\
One small UI change? Everything breaks.
ActionChain keeps your intent intact.
Whether the layout shifts, class names are obfuscated, or components get rerendered — your natural language instruction stays the same. The LLM adapts under the hood.
Traditional automation relies on static locators like:
driver.find_element(By.NAME, "username")
But as soon as the UI changes — your test breaks. Class names update, structures shift, and dynamic content appears. It's fragile.
With ActionChain
, you only need to describe your intent. The AI figures out the right path.
🧪 Bonus: Chainable Assertions
Automation is more than clicking — you often need to check what’s on the page:
ActionChain(driver) \
.find("Error message") \
.assert_text_contains("Invalid credentials")
You can even assert against full page content:
ActionChain(driver).assert_page_not_contains("No results found")
✅ Built for:
- Test engineers writing UI flows
- AI agent developers automating real browsers
- Devs tired of brittle XPath debugging
📦 How to use
pip install talk2dom
from talk2dom import ActionChain
You’ll need an OpenAI key or Groq key to use the LLM backend.\
(You can also customize with your own local model or Claude, etc.)
💬 Why ActionChain Changes the Game
Web pages are messy, unpredictable, and ever-changing.
Your automation shouldn’t be.
With ActionChain, you write your intent once — and let the model keep up with the DOM chaos. It’s a smarter, more resilient way to automate.
Write fewer selectors. Ship fewer flaky tests. Automate like a human.
🔗 GitHub: https://github.com/itbanque/talk2dom\
📦 PyPI: https://pypi.org/project/talk2dom