From 8c2c95f9a25ed2e0f3fc12bc9a80898a7d89c09d Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Wed, 8 Feb 2017 08:38:55 +0700 Subject: [PATCH] Updating README.md with latest simple example code --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 095a38f..9fb9d15 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,8 @@ func googleSearch(q, text string, site, res *string) cdp.Tasks { cdp.Navigate(`https://www.google.com`), cdp.Sleep(2 * time.Second), cdp.WaitVisible(`#hplogo`, cdp.ByID), - cdp.SendKeys(`#lst-ib`, q, cdp.ByID), - cdp.Click(`input[name="btnK"]`, cdp.ByQuery), - cdp.WaitNotVisible(`input[name="btnI"]`, cdp.ByQuery), + cdp.SendKeys(`#lst-ib`, q+"\n", cdp.ByID), + cdp.WaitVisible(`#res`, cdp.ByID), cdp.Text(sel, res), cdp.Click(sel), cdp.Sleep(2 * time.Second),