I have a project named testrequest
and I am working on a file named test_function_pack.py
. The working code within the said file is below:
service = Service(r'C:\user\Dev\Selenium\testrequest\drivers\chromedriver.exe')
I wish to try accessing the chromedriver.exe file using ..
or .
dots and by my understanding, the distance of the two file is two directories upward. I tested using the below code
import os
os.chdir('..')
service = Service(r'../../drivers/chromedriver.exe')
But the code above does not work, am I missing anything here? Any help is appreciated.
Here is the folder by the way: