首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Selenium driver.get()抛出异常

Selenium driver.get()抛出异常
EN

Stack Overflow用户
提问于 2018-06-26 03:24:42
回答 1查看 938关注 0票数 1

当我运行以下代码时使用

from selenium import webdriver
import time

driver = webdriver.Chrome('C:/Program Files 
(x86)/Google/Chrome/Application/chrome.exe')
driver.get('https://www.google.com/')

它只打开我的浏览器,而不打开作为参数传递给driver.get()的URL。

下面给出了回溯:

Traceback (most recent call last):
  File "C:\Users\efiqq\OneDrive\Plocha\Python\Link.py", line 4, in <module>
    driver = webdriver.Chrome('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe')
  File "C:\Users\efiqq\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in __init__
    self.service.start()
  File "C:\Users\efiqq\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 98, in start
    self.assert_process_still_running()
  File "C:\Users\efiqq\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 111, in assert_process_still_running
    % (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service C:/Program Files (x86)/Google/Chrome/Application/chrome.exe unexpectedly exited. Status code was: 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51030579

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档