久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='MPjjD'></bdo><ul id='MPjjD'></ul>

    1. <legend id='MPjjD'><style id='MPjjD'><dir id='MPjjD'><q id='MPjjD'></q></dir></style></legend>
      1. <small id='MPjjD'></small><noframes id='MPjjD'>

        <tfoot id='MPjjD'></tfoot>

        <i id='MPjjD'><tr id='MPjjD'><dt id='MPjjD'><q id='MPjjD'><span id='MPjjD'><b id='MPjjD'><form id='MPjjD'><ins id='MPjjD'></ins><ul id='MPjjD'></ul><sub id='MPjjD'></sub></form><legend id='MPjjD'></legend><bdo id='MPjjD'><pre id='MPjjD'><center id='MPjjD'></center></pre></bdo></b><th id='MPjjD'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='MPjjD'><tfoot id='MPjjD'></tfoot><dl id='MPjjD'><fieldset id='MPjjD'></fieldset></dl></div>

        WebDriverException:消息:服務(wù)/usr/bin/google-chrome 意外退

        WebDriverException: Message: Service /usr/bin/google-chrome unexpectedly exited. Status code was: -11 with ChromeDriver Chrome through Selenium Python(WebDriverException:消息:服務(wù)/usr/bin/google-chrome 意外退出.狀態(tài)代碼是:-11 wi

          <small id='sERjo'></small><noframes id='sERjo'>

          • <bdo id='sERjo'></bdo><ul id='sERjo'></ul>

                <tbody id='sERjo'></tbody>
                <legend id='sERjo'><style id='sERjo'><dir id='sERjo'><q id='sERjo'></q></dir></style></legend>

              1. <i id='sERjo'><tr id='sERjo'><dt id='sERjo'><q id='sERjo'><span id='sERjo'><b id='sERjo'><form id='sERjo'><ins id='sERjo'></ins><ul id='sERjo'></ul><sub id='sERjo'></sub></form><legend id='sERjo'></legend><bdo id='sERjo'><pre id='sERjo'><center id='sERjo'></center></pre></bdo></b><th id='sERjo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='sERjo'><tfoot id='sERjo'></tfoot><dl id='sERjo'><fieldset id='sERjo'></fieldset></dl></div>

                  <tfoot id='sERjo'></tfoot>
                • 本文介紹了WebDriverException:消息:服務(wù)/usr/bin/google-chrome 意外退出.狀態(tài)代碼是:-11 with ChromeDriver Chrome through Selenium Python的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在嘗試在 Python 腳本中運(yùn)行 webdriver,當(dāng)腳本嘗試運(yùn)行 google chrome 時,它??會以狀態(tài)碼 11 退出.

                  I am trying to run webdriver in a Python script, and when the script tries to run google chrome it exits with status code 11.

                  這里是python腳本:

                  Here is the python script:

                  #!/usr/bin/python3
                  import time
                  from selenium import webdriver
                  
                  driver = webdriver.Chrome('/usr/bin/google-chrome')  # Optional argument, if not specified will search path.
                  driver.get('http://www.google.com/');
                  time.sleep(5) # Let the user actually see something!
                  search_box = driver.find_element_by_name('q')
                  search_box.send_keys('ChromeDriver')
                  search_box.submit()
                  time.sleep(5) # Let the user actually see something!
                  driver.quit()
                  

                  這是完整的輸出:

                  [ec2-user@ip-xxx-xx-xx-xxx pythonscrape]$ python3 test-selenium-chrome.py
                  Traceback (most recent call last):
                    File "test-selenium-chrome.py", line 5, in <module>
                      driver = webdriver.Chrome('/usr/bin/google-chrome')  # Optional argument, if not specified will search path.
                    File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
                      self.service.start()
                    File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 98, in start
                      self.assert_process_still_running()
                    File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
                      % (self.path, return_code)
                  selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/google-chrome unexpectedly exited. Status code was: -11
                  

                  有誰知道為什么我的腳本在嘗試運(yùn)行 google chrome 時會報(bào)告錯誤代碼 11?

                  Does anyone know why my script reports the error code 11 when trying to run google chrome?

                  推薦答案

                  這個錯誤信息...

                  selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/google-chrome unexpectedly exited. Status code was: -11
                  

                  ...暗示 ChromeDriver 無法正確啟動/生成新的 Browsing ContextChrome 瀏覽器 會話.

                  ...implies that the ChromeDriver was unable to initiate/spawn the new Browsing Context i.e. Chrome Browser session properly.

                  看來你快到了.webdriver.Chrome() 的默認(rèn)參數(shù)是 ChromeDriver 二進(jìn)制文件的絕對路徑.但是,根據(jù)最佳實(shí)踐,您必須同時發(fā)送 KeyValue,如下所示:

                  Seems you were almost there. The default argument for webdriver.Chrome() is the absolute path of the ChromeDriver binary. However, as per best practices you must send both the Key and the Value as follows:

                  driver = webdriver.Chrome(executable_path='/path/to/chromedriver')  # Optional argument, if not specified will search path
                  

                  此外,如果您需要傳遞 Chrome 二進(jìn)制文件的絕對路徑,您必須通過 chrome.options如下:

                  Further, if you need to pass the absolute path of the Chrome binary you have to use the binary_location property through an instance of chrome.options as follows:

                  from selenium import webdriver
                  from selenium.webdriver.chrome.options import Options
                  
                  options = Options()
                  options.binary_location = '/path/to/chrome'
                  driver = webdriver.Chrome(options=options, executable_path='/path/to/chromedriver')
                  driver.get('http://google.com/')
                  

                  <小時>

                  參考

                  您可以在以下位置找到詳細(xì)討論:


                  Reference

                  You can find a detailed discussion in:

                  • Selenium: WebDriverException:Chrome啟動失敗:由于 google-chrome 不再運(yùn)行而崩潰,因此 ChromeDriver 假設(shè) Chrome 已崩潰

                  這篇關(guān)于WebDriverException:消息:服務(wù)/usr/bin/google-chrome 意外退出.狀態(tài)代碼是:-11 with ChromeDriver Chrome through Selenium Python的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                • <small id='LMenD'></small><noframes id='LMenD'>

                        <tbody id='LMenD'></tbody>
                          • <bdo id='LMenD'></bdo><ul id='LMenD'></ul>

                            <i id='LMenD'><tr id='LMenD'><dt id='LMenD'><q id='LMenD'><span id='LMenD'><b id='LMenD'><form id='LMenD'><ins id='LMenD'></ins><ul id='LMenD'></ul><sub id='LMenD'></sub></form><legend id='LMenD'></legend><bdo id='LMenD'><pre id='LMenD'><center id='LMenD'></center></pre></bdo></b><th id='LMenD'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='LMenD'><tfoot id='LMenD'></tfoot><dl id='LMenD'><fieldset id='LMenD'></fieldset></dl></div>
                            <legend id='LMenD'><style id='LMenD'><dir id='LMenD'><q id='LMenD'></q></dir></style></legend><tfoot id='LMenD'></tfoot>

                            主站蜘蛛池模板: 国产精品99久久久久久www | 一区二区三区在线观看免费视频 | 亚洲色图插插插 | 国产精品久久久久久吹潮 | 欧美一区二区久久 | 欧美一区| 久久av网 | 久久99网站 | 福利社午夜影院 | 久热中文字幕 | 中文字幕99| 久久久久久亚洲精品不卡 | 91av在线电影 | 欧美一区二区大片 | 亚洲狠狠 | 一区二区三区免费 | 国产精品成人久久久久a级 久久蜜桃av一区二区天堂 | 伊人焦久影院 | 中文字幕国产精品视频 | 欧美一级三级在线观看 | 亚洲精品久久久久久一区二区 | 国产精品亚洲片在线播放 | 日韩在线欧美 | 国产福利免费视频 | 日韩欧美在线一区 | 91一区二区三区 | 人人叉| 91亚洲国产亚洲国产 | 久久精品视频在线免费观看 | 日韩欧美在线观看视频网站 | 午夜激情影院 | 免费一区二区三区 | 精品久久久久久久久久久久久久 | 精品乱码一区二区三四区视频 | 成人在线视频免费观看 | 日韩成人免费 | 欧美精品中文字幕久久二区 | 国产欧美日韩在线观看 | 欧美日韩在线免费观看 | 欧美日韩中文国产一区发布 | 国内自拍第一页 |