I can run chromedriver.exe from the same folder where the program is located:
def webdrivers():
dir = os.path.dirname(os.path.abspath(__file__))
webdrivers = dir + "\\chromedriver.exe"
return(webdrivers)
driver = webdriver.Chrome(webdrivers(), options=option)
And it works...
But how to do this to enable the Brave browser from an application shortcut that is in the same folder as the program? I tried:
def bravebrowser():
dir = os.path.dirname(os.path.abspath(__file__))
bravebrowser = dir + "\\Brave.lnk"
return(bravebrowser)
When I run the program and display bravebrowser(), the path is right in print() and that's exactly where the shortcut to the Brave browser is, but when I use it, it doesn't work (brave not start).
print:
C:\Users\Admin\Desktop\Program\Brave.lnk
but that not work...:
option.binary_location(bravebrowser())
Some solution?