I have two files using Selenium to run different tasks.
I can run them separately(only one running), but if I want to run the two files no matter at the same time or run it one by one. The second one will crash with the following errors.
File "site-packages\selenium\webdriver\chrome\webdriver.py", line 75, in __ini
__
File "site-packages\selenium\webdriver\remote\webdriver.py", line 156, in __in
t__
File "site-packages\selenium\webdriver\remote\webdriver.py", line 251, in star
_session
File "site-packages\selenium\webdriver\remote\webdriver.py", line 320, in exec
te
File "site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in c
eck_response
elenium.common.exceptions.WebDriverException: Message: unknown error: Chrome fa
led 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 C
rome has crashed.)
(Driver info: chromedriver=2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c19
e),platform=Windows NT 6.1.7601 SP1 x86_64)
The code is quite simple like:
u = getpass.getuser()
chrome_options = Options()
## Add the user information
chrome_options.add_argument('user-data-dir=C:\\Users\\%s\\AppData\\Local\\Google\\Chrome\\User Data' % (u))
## SF Case page
source = "https://na66.salesforce.com/500?fcf=00BC0000008hfCI"
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get(source)
Any suggestions please?