Skip to content

Commit cb9c567

Browse files
committed
refactor: clean up examples
1 parent 80304b4 commit cb9c567

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

examples/add-init-script.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2727
.await?;
2828

2929
// Navigate to a page
30-
page.goto("https://www.wikipedia.org").await?;
31-
page.wait_for_navigation().await?;
32-
33-
page.find_element("h1").await?;
30+
page.goto("https://www.wikipedia.org")
31+
.await?
32+
.find_element("h1")
33+
.await?;
3434

3535
let _html = page.wait_for_navigation().await?.content().await?;
3636

examples/evaluate-on-new-document.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2727
.await?;
2828

2929
// Navigate to a page
30-
page.goto("https://www.wikipedia.org").await?;
31-
page.wait_for_navigation().await?;
32-
33-
page.find_element("h1").await?;
30+
page.goto("https://www.wikipedia.org")
31+
.await?
32+
.find_element("h1")
33+
.await?;
3434

3535
let _html = page.wait_for_navigation().await?.content().await?;
3636

0 commit comments

Comments
 (0)