From d066e2d0584e5b1fcfae1ae7f36bf0a22580cf4f Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Sat, 27 Nov 2021 05:52:01 +0700 Subject: [PATCH] Changing emulate example to use duckduckgo instead of google --- example_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example_test.go b/example_test.go index 7baef5df..c0175196 100644 --- a/example_test.go +++ b/example_test.go @@ -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) }