I
I
i_vovani2020-10-31 16:15:36
Python
i_vovani, 2020-10-31 16:15:36

Why does not see webdriver?

In general, I want to install webdriver on Macos, but he swears and says that there is no binary, I tried it and just install it through the zip archive, tried it through brew, still nothing :(

from selenium import webdriver
import time

def main():
    driver = webdriver.Chrome('chromedriver')
    driver.get('https://google.com/')

if __name__ == "__main__":
    main()

chromedriver file and python script are in the same folder

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Magic Code, 2020-10-31
@Panda_Code

You must first download Webdriver, according to your browser version and then specify the path to it, for example:

driver = webdriver.Chrome('G:\\SeleniumDriver\\chromedriver.exe')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question