美文网首页
selenium.common.exceptions.WebDr

selenium.common.exceptions.WebDr

作者: mutang | 来源:发表于2020-06-22 22:57 被阅读0次

    问题:

            chrome_options = webdriver.ChromeOptions()
            chrome_options.add_argument("--mute-audio")  # 静音
            chrome_options.binary_location = "D:\Google\Chrome\Application\chromedriver.exe"
            dr = webdriver.Chrome(options=chrome_options)
            dr.maximize_window()
    

    报错:

    raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: was killed.
    (unknown error: DevToolsActivePort file doesn't exist)
    (The process started from chrome location D:\Google\Chrome\Application\chromedriver.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

    解决:

            chrome_options = webdriver.ChromeOptions()
            chrome_options.add_argument("--mute-audio")  # 静音
            dr = webdriver.Chrome("D:\Google\Chrome\Application\chromedriver.exe",options=chrome_options)
            dr.maximize_window()
    

    相关文章

      网友评论

          本文标题:selenium.common.exceptions.WebDr

          本文链接:https://www.haomeiwen.com/subject/htrqfktx.html