File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ use thirtyfour::prelude::*;
4444#[tokio:: main]
4545async fn main () -> WebDriverResult <()> {
4646 let caps = DesiredCapabilities :: chrome ();
47- let driver = WebDriver :: new ( " http://localhost:9515 " , caps ). await ? ;
47+ let driver = WebDriver :: managed ( caps ). await ? ;
4848
4949 // Navigate to https://wikipedia.org.
5050 driver . goto (" https://wikipedia.org" ). await ? ;
Original file line number Diff line number Diff line change 3636//! ## Example
3737//!
3838//! The following example assumes you have a compatible version of Chrome
39- //! installed and `chromedriver` running on port 4444.
39+ //! installed. [`WebDriver::managed`] auto-downloads the matching
40+ //! `chromedriver`, starts it locally, and shuts it down when the session is
41+ //! dropped.
4042//!
4143//! ```no_run
4244//! use thirtyfour::prelude::*;
4345//!
4446//! #[tokio::main]
4547//! async fn main() -> color_eyre::Result<()> {
4648//! let caps = DesiredCapabilities::chrome();
47- //! let driver = WebDriver::new("http://localhost:4444", caps).await?;
49+ //! let driver = WebDriver::managed( caps).await?;
4850//!
4951//! // Navigate to https://wikipedia.org.
5052//! driver.goto("https://wikipedia.org").await?;
You can’t perform that action at this time.
0 commit comments