aisingapore / TagUI

Free RPA tool by AI Singapore
Apache License 2.0
5.6k stars 580 forks source link

is there any issue with google search engine ?? #310

Closed balwant-sd closed 5 years ago

balwant-sd commented 5 years ago

I want to make a workflow using google search engine which read temperature. My code is

https://google.com/
type //*[@id="lst-ib"] as weather singapore [enter]
read //*[@id="wob_tm"] to temperature
snap page
echo temperature

my code run easily in bing, yahoo but not in google. whenever i run my code for google it gives error -

START - automation started - Mon Nov 12 2018 16:31:57 GMT+0530 (IST)
https://google.com/ - Google

type //*[@id="lst-ib"] as weather singapore [Enter]
ERROR - cannot find //*[@id="lst-ib"]

is there any issue with google search engine ??

Aussiroth commented 5 years ago

Hi, I believe you are running this in either headless or default phantomjs mode. Google tries to block robots, so headless browsers (as I know of) will not be able to load https://www.google.com. You will need to use the chrome option for scripts using google to work.

kensoh commented 5 years ago

Yeah, you may also encounter more strange issues on other websites when you switched to headless or default PhantomJS invisible mode. Working with such cases is not impossible, in some cases, you can use live step to interactively test the webpage in headless mode. Using steps such as show, snap, save page - more details here - https://github.com/kelaberetiv/TagUI#steps-description

But it won't be easy, you can spend a lot of time but still can't get it to work. Some website intentionally do not want headless browsers to work, so those websites impossible to run headlessly. Of course, if your organizations uses virtual machines, you can run on the VMs in normal chrome mode but the VMs are run in background anyway.

(fyi Alvin, sometimes chipping in whenever I can, because gonna get real busy soon for me)

balwant-sd commented 5 years ago

Thanks