简体   繁体   English

从 chrome 位置 C:\\..\\Chrome\\Application\\chrome.exe 开始的进程不再运行,因此 ChromeDriver 假设 Chrome 已崩溃

[英]The process started from chrome location C:\..\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed

Chrome version: 68.0.3440.106 Chrome 版本:68.0.3440.106
Chrome webdriver version: ChromeDriver 2.41.578737 Chrome 网络驱动程序版本:ChromeDriver 2.41.578737
Python Version : Python 3.5.2 Python 版本:Python 3.5.2

I write this code in python:我用python写了这段代码:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys


o = webdriver.ChromeOptions()
o.add_argument("disable-extensions");
o.add_argument("--start-maximized");
driver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=o)
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

after few seconds chrome opened with this error:几秒钟后 chrome 打开时出现此错误:


and nothing happend till i close chrome and get this exception:在我关闭 chrome 并得到这个异常之前,什么都没有发生:

    Traceback (most recent call last):
  File ".../game.py", line 8, in <module>
    driver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=o)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 75, in __init__
    desired_capabilities=desired_capabilities)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 156, in __init__
    self.start_session(capabilities, browser_profile)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 251, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
    self.error_handler.check_response(response)
  File "...\Python\Python35-32\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: exited normally
  (unknown error: unable to discover open pages)
  (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.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.17134 x86_64)

Chrome version: 68.0.3440.106 Chrome版本:68.0.3440.106
Chrome webdriver version: ChromeDriver 2.41.578737 Chrome网络驱动程序版本:ChromeDriver 2.41.578737
Python Version : Python 3.5.2的Python版本:的Python 3.5.2

I write this code in python:我用python编写以下代码:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys


o = webdriver.ChromeOptions()
o.add_argument("disable-extensions");
o.add_argument("--start-maximized");
driver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=o)
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

after few seconds chrome opened with this error:几秒钟后,chrome打开,并显示以下错误:


and nothing happend till i close chrome and get this exception:在我关闭chrome并获得此异常之前,什么也没有发生:

    Traceback (most recent call last):
  File ".../game.py", line 8, in <module>
    driver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=o)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 75, in __init__
    desired_capabilities=desired_capabilities)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 156, in __init__
    self.start_session(capabilities, browser_profile)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 251, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
    self.error_handler.check_response(response)
  File "...\Python\Python35-32\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: exited normally
  (unknown error: unable to discover open pages)
  (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.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.17134 x86_64)

I recently had this issue using TeamCity, which was caused by chrome (and chromedriver) not shutting down after executing my script.我最近在使用 TeamCity 时遇到了这个问题,这是由 chrome(和 chromedriver)在执行我的脚本后没有关闭引起的。 inserting "taskkill /f /im chrome.exe" and "taskkill /f /im chromedriver.exe" fixed this issue.插入“taskkill /f /im chrome.exe”和“taskkill /f /im chromedriver.exe”修复了这个问题。

Chrome version: 68.0.3440.106 Chrome版本:68.0.3440.106
Chrome webdriver version: ChromeDriver 2.41.578737 Chrome网络驱动程序版本:ChromeDriver 2.41.578737
Python Version : Python 3.5.2的Python版本:的Python 3.5.2

I write this code in python:我用python编写以下代码:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys


o = webdriver.ChromeOptions()
o.add_argument("disable-extensions");
o.add_argument("--start-maximized");
driver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=o)
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

after few seconds chrome opened with this error:几秒钟后,chrome打开,并显示以下错误:


and nothing happend till i close chrome and get this exception:在我关闭chrome并获得此异常之前,什么也没有发生:

    Traceback (most recent call last):
  File ".../game.py", line 8, in <module>
    driver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=o)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 75, in __init__
    desired_capabilities=desired_capabilities)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 156, in __init__
    self.start_session(capabilities, browser_profile)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 251, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
    self.error_handler.check_response(response)
  File "...\Python\Python35-32\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: exited normally
  (unknown error: unable to discover open pages)
  (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.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.17134 x86_64)

Chrome version: 68.0.3440.106 Chrome版本:68.0.3440.106
Chrome webdriver version: ChromeDriver 2.41.578737 Chrome网络驱动程序版本:ChromeDriver 2.41.578737
Python Version : Python 3.5.2的Python版本:的Python 3.5.2

I write this code in python:我用python编写以下代码:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys


o = webdriver.ChromeOptions()
o.add_argument("disable-extensions");
o.add_argument("--start-maximized");
driver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=o)
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

after few seconds chrome opened with this error:几秒钟后,chrome打开,并显示以下错误:


and nothing happend till i close chrome and get this exception:在我关闭chrome并获得此异常之前,什么也没有发生:

    Traceback (most recent call last):
  File ".../game.py", line 8, in <module>
    driver = webdriver.Chrome(executable_path=r"chromedriver.exe",options=o)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 75, in __init__
    desired_capabilities=desired_capabilities)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 156, in __init__
    self.start_session(capabilities, browser_profile)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 251, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "...\Python\Python35-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
    self.error_handler.check_response(response)
  File "...\Python\Python35-32\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: exited normally
  (unknown error: unable to discover open pages)
  (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.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.17134 x86_64)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Selenium:WebDriverException:Chrome 无法启动:由于 google-chrome 不再运行而崩溃,因此 ChromeDriver 假设 Chrome 已崩溃 - Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed chromedriver 不再运行,因此 ChromeDriver 假设 Chrome 使用 Selenium 到 Python 发生崩溃错误 - chromedriver is no longer running, so ChromeDriver is assuming that Chrome has crashed error using Selenium through Python WebDriverException:消息:未知错误:C:/.../Chrome/Application/chrome.exe 处没有 Chrome 二进制文件,带有 ChromeDriver Selenium 和 Python - WebDriverException: Message: unknown error: no chrome binary at C:/.../Chrome/Application/chrome.exe with ChromeDriver Selenium and Python selenium chromedriver: chrome.exe 打开python日志文件处理程序文件 - selenium chromedriver: chrome.exe open the python logging filehandler file python 代码将终止用户输入的另一个进程(例如 chrome.exe)? - python code that will terminate another process (chrome.exe for example) on user imput? Python 3.5.2-如何使用备用模块检测正在运行的程序,即“ chrome.exe” - Python 3.5.2 - How to detect a program running i.e “chrome.exe” using stock modules 无法通过 Python 中的 Selenium 杀死 Chrome 进程并使用 ChromeDriver 和 Chrome 耗尽内存 - Unable to kill Chrome process and running out of memory with ChromeDriver and Chrome through Selenium in Python 尽管使用了driver.close()和driver.quit(),为什么Chrome.exe和chromedriver.exe仍会出现在计算机的内存中? - Why do Chrome.exe and chromedriver.exe still appear in the computer's memory, despite using driver.close() and driver.quit()? Chrome 和 chromeDriver 不匹配 - Chrome and chromeDriver mismatch GPU 进程在无头模式下使用 ChromeDriver 和 Chrome 以及 --disable-gpu 和 --user-data-dir arguments 时崩溃了 x 次错误 - The GPU process has crashed x time(s) error using ChromeDriver and Chrome in headless mode along with --disable-gpu and --user-data-dir arguments
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM