Puppeteer for Rust. It looks a little something like this:
```rust use headless_chrome::browser::{Browser, LaunchOptions};
let browser = Browser::new(LaunchOptions {
headless: true,
path: "/usr/bin/google-chrome", // BYO Chrome binary
..Default::default()
})?;
let tab = browser.waitforinitial_tab()?;
tab.navigate_to("https://www.wikipedia.org")?;
tab.waitforelement(r#"input#searchInput"#)?.click()?;
tab.typestr("WebKit")?;
tab.presskey("Enter")?;
tab.waitforelement("#firstHeading")?;
asserteq!(true, tab.geturl().ends_with("WebKit")); ```
For fuller examples, take a look at tests/integration.rs
.
window.alert
handlers
Pull requests and issues are most welcome, even if they're just experience reports. If you find anything frustrating or confusing, let me know!