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
.htmlIDE 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 command | BaseCase method |
|---|---|
open | open(url) |
type | type_text(selector, text) |
click | click(selector) |
assertText | assert_text_visible(text, selector) |
waitForElementPresent | wait_for_element_present(selector).await? |
pause | tokio::time::sleep(...).await |
Limitations#
Warning
- This parser targets the legacy Selenium IDE HTML format, not the modern
.sideJSON 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.