简体   繁体   中英

Why can't i open chrome with selenium?

I want to use selenium.webdriver to do anything, but my program doesnt seem to work

I think the problem is with the path in the script, but i am not sure because I literaly copied the text from the file path

from selenium import webdriver
from selenium import webdriver
driver = webdriver.Firefox(executable_path='/Users/Rafa/Documents/Python Projects/Firefox')
firefox.get('http://google.com.br/')

I want it to open google in firefox (any browser would serve, people recomended ,e firefox)

selenium.common.exceptions.WebDriverException: Message: 'Firefox' executable may have wrong permissions. 

In initializing your webdriver you don't use the firefox browser or google browser.

You need to use their respective drivers to allow an automation software to control it.

gecodriver for firefox

chromium driver for google chrome

Check their versions too for it to work.

Good luck :))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM