When I run my Python-Selenium test with Eclipse it works. If I add the Python test as batch file in Jenkins I always get this error:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
I set the path for Python in windows correctly. Can anyone help, please. Thank you.
I set the path like this:
self.driver = webdriver.Chrome("C://Selenium-driver//chromedriver.exe")
pts = webdriver.ChromeOptions()
opts.binary_location = ("C://Users//me//AppData//Local//Google //Chrome//Application//chrome.exe")
driver = webdriver.Chrome(chrome_options = opts)
I run the batch file like this in Jenkins with an Execute Windows batch command:
call "c:\myfolder\login_python2.bat"
The batch file is:
@echo off
cd C:\Users\me\AppData\Local\Programs\Python\Python36\
python C:\Users\me\NEON\workspace\Test1\test-package\test.py