I've got this code:
Another post said it was an issue with a non-default installation of the chrome binary, but my install was installed in the default location.
When I run it with any chrome processes active it fails and gives this log:
Thanks :)
options = webdriver.ChromeOptions() options.add_argument("--user-data-dir=C:/Users/RvBVakama/AppData/Local/Google/Chrome/User Data") options.add_argument("--disable-extensions") options.binary_location = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" w = webdriver.Chrome(executable_path="C:/Program Files (x86)/Google/Chrome/Application/chromedriver.exe", options=options) w.get("https://www.google.com/")When I run my program without any chrome processes active, it works.
Another post said it was an issue with a non-default installation of the chrome binary, but my install was installed in the default location.
When I run it with any chrome processes active it fails and gives this log:
Error:Traceback (most recent call last):
File "tet.py", line 9, in <module>
w = webdriver.Chrome(executable_path="C:/Program Files (x86)/Google/Chrome/Application/chromedriver.exe", options=options)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 6.1.7601 SP1 x86_64)
My aim is to have my program run in the background once every hour. If my program requires me to close every tab and window just to run my script I would not be nice.Thanks :)