Skip to main content
Legacy .html format

If you have legacy Selenium IDE .html test cases, SeleniumBase for Rust can parse them into a list of commands that you can replay with BaseCase. This guide shows how to migrate those tests into Rust code.

Info

What you will learn

  • How to parse legacy .html IDE files and strings.
  • How to replay parsed commands with BaseCase.
  • Which commands map directly and which need manual translation.

Parse an IDE HTML file or string#

Replay commands with BaseCase#

src/main.rs

Supported command format#

The parser expects a simple HTML table with three cells per row:

Rows with fewer than three cells are ignored. The SeleniumIdeCommand struct exposes command, target, and value as String fields.

Common command mappings#

IDE commandBaseCase method
openopen(url)
typetype_text(selector, text)
clickclick(selector)
assertTextassert_text_visible(text, selector)
waitForElementPresentwait_for_element_present(selector).await?
pausetokio::time::sleep(...).await

Limitations#

Warning
  • This parser targets the legacy Selenium IDE HTML format, not the modern .side JSON format.
  • Flow-control commands (if, while, storeEval) are not interpreted; map them to Rust control flow manually.
  • Variables and stored values are not automatically carried over; use Rust variables or the store_* helpers if available.