Answer the question
In order to leave comments, you need to log in
Python selenium how to specify path relative to script?
I don't want to hardcode the absolute path, because I will compile to exe and of course it won't work for users.
driver = webdriver.Chrome(r"path\chromedriver.exe")
driver = webdriver.Chrome('../chromedriver.exe')
Googled these 2 options and none of them work.
ps if it's easier, circumstances forced me to work with python, I myself work with php
Answer the question
In order to leave comments, you need to log in
driver = webdriver.Chrome('folder\chromedriver.exe')
#or
driver = webdriver.Chrome(r'folder/chromedriver.exe')
#or
driver = webdriver.Chrome('chromedriver.exe')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question