TagUI: 1_google.tag fails to find element q - try this, google.com different for diff locations
Plain vanilla TagUI macOS install, per the instructions. Fails to find anything:
nathan@Nathans-MBP samples % tagui ./1_google.tag
START - automation started - Tue Feb 23 2021 10:25:08 GMT-0600 (CST)
https://www.google.com - Google
type q as latest movies[enter]
click (//*[@class="g"])[1]//a
ERROR - cannot find (//*[@class="g"])[1]//a
Using Chrome TagUI plugin, I discover the search box is not named as “q” but as “.gLFyf.gsfi”:
https://www.google.com/
type .gLFyf.gsfi as solar ecpipselipse[enter]
If I edit 1_google.tag to match the weird name, it works:
nathan@Nathans-MBP samples % tagui ./1a_google.tag
START - automation started - Tue Feb 23 2021 12:19:49 GMT-0600 (CST)
https://www.google.com - Google
type .gLFyf.gsfi as latest movies[enter]
click (//*[@class="g"])[1]//a
wait 3
snap page to top_result.png
https://editorial.rottentomatoes.com/guide/the-best-movies-of-2020/ - The Best Movies of 2020 – Best New Films of the Year << Rotten Tomatoes – Movie and TV News
FINISH - automation finished - 11.5s
What is wrong here? Google page source:
<input class="gLFyf gsfi" maxlength="2048" name="q" type="text" jsaction="paste:puy29d" aria-autocomplete="both" aria-haspopup="false" autocapitalize="off" autocomplete="off" autocorrect="off" autofocus="" role="combobox" spellcheck="false" title="Search" value="" aria-label="Search" data-ved="0ahUKEwjRrJP6zoDvAhUJSa0KHaPmB0IQ39UDCAY">
It appears TagUI only looks for the “input class”, and not the name? What am I doing wrong?
Thanks
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (9 by maintainers)
Commits related to this issue
- #944 - update google sample with fallback note — committed to aisingapore/TagUI by kensoh 3 years ago
Thanks for your help kensoh