Skip to content

Commit

Permalink
Changing emulate example to use duckduckgo instead of google
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Nov 26, 2021
1 parent abbd1f3 commit d066e2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,15 @@ func ExampleEmulate() {
var buf []byte
if err := chromedp.Run(ctx,
chromedp.Emulate(device.IPhone7),
chromedp.Navigate(`https://google.com/`),
chromedp.Navigate(`https://duckduckgo.com/`),
chromedp.SendKeys(`input[name=q]`, "what's my user agent?\n"),
chromedp.WaitVisible(`#rso`, chromedp.ByID),
chromedp.WaitVisible(`#zci-answer`, chromedp.ByID),
chromedp.CaptureScreenshot(&buf),
); err != nil {
log.Fatal(err)
}

if err := ioutil.WriteFile("google-iphone7.png", buf, 0o644); err != nil {
if err := ioutil.WriteFile("iphone7-ua.png", buf, 0o644); err != nil {
log.Fatal(err)
}

Expand Down

0 comments on commit d066e2d

Please sign in to comment.