octaltree / playwright-rust

Playwright port to Rust
298 stars 31 forks source link

How to only install one browser? #9

Closed Boscop closed 3 years ago

Boscop commented 3 years ago

Thanks for this useful crate :)

I have a question: How to only install one browser? (E.g. chromium)

octaltree commented 3 years ago

Glad to see you're using this.

You can use this snippet.

fn install_chromium(playwright: &mut Playwright) -> std::io::Result<()>{
  std::process::Command::new(playwright.driver().executable())
    .args(&["install", "chrome"])
    .status()?
  Ok(())
}

I may provide this from playwright-rust later.