Skip to content

Instantly share code, notes, and snippets.

@hamletbatista
Created April 2, 2019 20:03
Show Gist options
  • Select an option

  • Save hamletbatista/696d3527272c9803a43e526e29bd9096 to your computer and use it in GitHub Desktop.

Select an option

Save hamletbatista/696d3527272c9803a43e526e29bd9096 to your computer and use it in GitHub Desktop.
#example input box selector, changes often
sel= "#gb > div.gb_gd.gb_Md.gb_Zb > div.gb_lc.gb_wd.gb_Fd.gb_rd.gb_vd.gb_Cd > div.gb_td > form > div > div > div > div > div > div.d1dlne > input.Ax4B8.ZAGvjd"
await page.waitForSelector(sel)
await page.click(sel)
#await page.querySelectorEval(sel, "el => el.value = 'Testing 123'") #doen't work
await page.keyboard.type(url) #input url
await page.keyboard.press("Enter")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment