Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chrome.exe secondary location for Windows - upstream change [done] #103

Closed
juniorkidsu opened this issue Feb 5, 2020 · 11 comments
Closed
Labels

Comments

@juniorkidsu
Copy link

import rpa as r
r.init()
r.url('https://ca.yahoo.com')
r.type('search-box', 'github')

search_text = r.read('search-box')
print(search_text)

r.click('search-button')
r.wait(6.6)

r.snap('page', 'results.png')
r.snap('logo', 'logo.png')

r.url('https://duckduckgo.com')
r.type('search_form_input_homepage', 'The search engine that doesn't track you.')
r.snap('page', 'duckduckgo.png')
r.wait(4.4)

r.close()

THIS IS SAMPLE CODE FROM RPA library but on got some error like this
image

What can i fix this case?? because i declare init() before using url()

@kensoh
Copy link
Member

kensoh commented Feb 5, 2020

It looks like TagUI can't be started on your laptop. It could be due to different reasons -

Can you provide more information such as OS (Windows, macOS, Linux) and your user name for the OS? On Windows, there is problem with user name having space in it, and if the folder you are running automation has a space in the pathname.

Another common cause is some companies have network restriction to prevent downloading automatically from the GitHub URLs. Depending on your OS the location to check is different. For Windows it is in the %APPDATA%\tagui folder.

If you are running macOS, check that it is not due to Catalina blocking TagUI from running -

🍎 macOS - Catalina update introduces tighter app security,
see solutions for PhantomJS and Java popups

@kensoh kensoh added the query label Feb 5, 2020
@kensoh kensoh changed the title RPA-python: [RPA][ERROR] - use init() before using RPA-python: [RPA][ERROR] on sample.py - pending user checks Feb 5, 2020
@juniorkidsu
Copy link
Author

My OS platform is Windonw10 1809

In another case i checking in tagui folder. There completely all of file or you want me to some important file/folder?

@kensoh
Copy link
Member

kensoh commented Feb 6, 2020

Try this -
Open command prompt

cd %appdata%
cd tagui
cd src
tagui samples/1_yahoo chrome

Then tell me what error you have

@juniorkidsu
Copy link
Author

Ok i found this!
image

@kensoh
Copy link
Member

kensoh commented Feb 6, 2020

This is strange, this error message should appear when you do r.init() to tell user what is the issue.

The message is because Chrome application is not found on your computer at the folder which is commonly installed on Windows for Chrome. Make sure you have Chrome browser installed.

If you already have Chrome installed but it is not in above location, edit %appdata%\tagui\src\tagui.cmd and change the chrome_command setting to the location of your chrome.exe. Note that if you modify it, after you pip install rpa --upgrade this modification will be lost. Also, let me know your chrome.exe location. This will be useful info to see if TagUI can be improved to recognise other locations.

@kensoh kensoh changed the title RPA-python: [RPA][ERROR] on sample.py - pending user checks [RPA][ERROR] on sample.py - chrome.exe missing pending user checks Feb 6, 2020
@juniorkidsu
Copy link
Author

OK this here is my Chrome location
C:\Users\MyUsername\AppData\Local\Google\Chrome\Application

How can i edit in tagui.cmd when i open,there already early close

@kensoh
Copy link
Member

kensoh commented Feb 7, 2020

Thanks, I see.. You can use Notepad editor and open the file tagui.cmd, after that you can modify at top of the file the following to the correct Chrome browser location on your computer -

rem configure command to launch chrome for Windows
set chrome_command=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

@juniorkidsu
Copy link
Author

Ok this time i change application i found this Alert! when i run tagui sample/...

Fatal: The system cannot find the file specified; did you install phantomjs?
?? it's callme to install phantomjs or i will recheck this folder

@juniorkidsu
Copy link
Author

Nicee after i copy phantomjs folder it's working!! both of cmd and python Script
Thank you so much for advice XD @kensoh
everything working well

@kensoh kensoh changed the title [RPA][ERROR] on sample.py - chrome.exe missing pending user checks [RPA][ERROR] on sample.py - chrome.exe in non-standard folder Feb 7, 2020
@kensoh
Copy link
Member

kensoh commented Feb 7, 2020

That's great, thanks for your update @juniorkidsu !

The PhantomJS is likely due to firewall or anti-virus restriction which may block PhantomJS from being download and extracted to the folder. Glad that you have resolved it, have fun using it!

@kensoh kensoh closed this as completed Feb 7, 2020
@kensoh kensoh changed the title [RPA][ERROR] on sample.py - chrome.exe in non-standard folder [RPA][ERROR] on sample.py - added Windows chrome.exe secondary location [done] Feb 16, 2020
@kensoh kensoh added feature and removed query labels Feb 16, 2020
@kensoh kensoh reopened this Feb 16, 2020
@kensoh kensoh changed the title [RPA][ERROR] on sample.py - added Windows chrome.exe secondary location [done] Add chrome.exe secondary location for Windows - upstream change [done] Feb 16, 2020
@kensoh
Copy link
Member

kensoh commented Feb 16, 2020

Upstream TagUI change, implemented in v1.25, available with pip install rpa --upgrade

Some Windows users may not install Chrome to C:\Program Files... folder due to no access rights to install Chrome system wide (default behaviour) or did not approve the user access control to install there. Added a secondary location that is hosted in %LOCALAPPDATA%... folder so those minority group of users don't have to manually edit the tagui.cmd file to point to that location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants