Updating README.md with latest simple example code
This commit is contained in:
parent
80235c270b
commit
8c2c95f9a2
|
@ -80,9 +80,8 @@ func googleSearch(q, text string, site, res *string) cdp.Tasks {
|
||||||
cdp.Navigate(`https://www.google.com`),
|
cdp.Navigate(`https://www.google.com`),
|
||||||
cdp.Sleep(2 * time.Second),
|
cdp.Sleep(2 * time.Second),
|
||||||
cdp.WaitVisible(`#hplogo`, cdp.ByID),
|
cdp.WaitVisible(`#hplogo`, cdp.ByID),
|
||||||
cdp.SendKeys(`#lst-ib`, q, cdp.ByID),
|
cdp.SendKeys(`#lst-ib`, q+"\n", cdp.ByID),
|
||||||
cdp.Click(`input[name="btnK"]`, cdp.ByQuery),
|
cdp.WaitVisible(`#res`, cdp.ByID),
|
||||||
cdp.WaitNotVisible(`input[name="btnI"]`, cdp.ByQuery),
|
|
||||||
cdp.Text(sel, res),
|
cdp.Text(sel, res),
|
||||||
cdp.Click(sel),
|
cdp.Click(sel),
|
||||||
cdp.Sleep(2 * time.Second),
|
cdp.Sleep(2 * time.Second),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user