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

<legend id='G6wFs'><style id='G6wFs'><dir id='G6wFs'><q id='G6wFs'></q></dir></style></legend>

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

    1. <tfoot id='G6wFs'></tfoot>

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

        <bdo id='G6wFs'></bdo><ul id='G6wFs'></ul>

      1. ChromeDriver ERR_SSL_PROTOCOL_ERROR 盡管 --ignore-certifica

        ChromeDriver ERR_SSL_PROTOCOL_ERROR despite --ignore-certificate-errors(ChromeDriver ERR_SSL_PROTOCOL_ERROR 盡管 --ignore-certificate-errors)
        <legend id='HsR7u'><style id='HsR7u'><dir id='HsR7u'><q id='HsR7u'></q></dir></style></legend>

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

                <tbody id='HsR7u'></tbody>
              • <small id='HsR7u'></small><noframes id='HsR7u'>

                  本文介紹了ChromeDriver ERR_SSL_PROTOCOL_ERROR 盡管 --ignore-certificate-errors的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試使用 selenium 和 ChromeDriver 在本地主機(沒有 HTTPS)上運行集成測試.

                  Chrome 需要 https 證書,但從 this 問題中我了解到我可以使用 arg --ignore-certificate-errors

                  來規避這個問題

                  我還增加了我的能力 acceptInsecureCerts,因為這似乎是適當的行動方案(docs)

                  chromedriver 的反應還是出乎我的意料:

                  <塊引用>

                  此網站無法提供安全連接 應用發送了無效響應.ERR_SSL_PROTOCOL_ERROR

                  我的代碼如下:

                  從 selenium 導入 webdriver從 selenium.webdriver.chrome.options 導入選項# 制作選項(主要是忽略證書)選項 = webdriver.ChromeOptions()options.add_argument('--ignore-certificate-errors')# 添加acceptInsecureCerts能力 = options.to_capabilities()能力['acceptInsecureCerts'] = Trueprint(capabilities) # 見下文驅動程序 = webdriver.Remote(command_executor=SELENIUM_HUB,所需的能力=能力)print(driver.__dict__) # 見下文app_login_url = 'http://app:8000/accounts/login/'driver.get(app_login_url)

                  我的能力:

                  {'acceptInsecureCerts': True,瀏覽器名稱":鉻",'goog:chromeOptions': {'args': ['--ignore-certificate-errors'],'擴展':[]},平臺":任何",'版本': ''}

                  這是我的驅動程序信息,似乎只考慮了 acceptInsecureCerts 參數:

                  {'_file_detector': <selenium.webdriver.remote.file_detector.LocalFileDetector object at 0x7fb42bde10f0>,'_is_remote':是的,'_mobile': <selenium.webdriver.remote.mobile.Mobile 對象在 0x7fb42bb5e400>,'_switch_to': <selenium.webdriver.remote.switch_to.SwitchTo 對象在 0x7fb42bdd4898>,'功能':{'acceptInsecureCerts':真,'acceptSslCerts':是的,'applicationCacheEnabled':假,'browserConnectionEnabled':假,瀏覽器名稱":鉻",'chrome': {'chromedriverVersion': '74.0.3729.6''(255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29})','userDataDir': '/tmp/.com.google.Chrome.vc1ZvB'},'cssSelectorsEnabled':真,'databaseEnabled':假,'goog:chromeOptions': {'debuggerAddress': 'localhost:40815'},'handlesAlerts':是的,'hasTouchScreen':錯誤,'javascriptEnabled':是的,'locationContextEnabled':真,'mobileEmulationEnabled':假,'nativeEvents':是的,'networkConnectionEnabled':假,'pageLoadStrategy': '正常',平臺":Linux",'代理人': {},可旋轉":錯誤,'setWindowRect':真,'strictFileInteractability':假,'takesHeapSnapshot':是的,'takesScreenshot':是的,'超時':{'隱式':0,頁面加載":300000,'腳本': 30000},'unexpectedAlertBehaviour': '忽略','版本': '74.0.3729.169','webStorageEnabled':真,'webdriver.remote.sessionid': '1cf77f237e966bac6ca15d4d9c107423'},'command_executor': <selenium.webdriver.remote.remote_connection.RemoteConnection 對象在 0x7fb42be0cf98>,'error_handler': <selenium.webdriver.remote.errorhandler.ErrorHandler 對象在 0x7fb427d08a20>,'session_id': '1cf77f237e966bac6ca15d4d9c107423','w3c':錯誤}

                  為什么我仍然看到 ERR_SSL_PROTOCOL_ERROR?

                  解決方案

                  這個錯誤信息...

                  此站點無法提供安全連接應用程序發送了無效響應.ERR_SSL_PROTOCOL_ERROR

                  ...暗示 ChromeDriver 無法在您的本地主機上啟動/生成新的 WebBrowserChrome 瀏覽器 會話.p>

                  根據 this comment 一個盲目的解決方案是添加 argument --allow-insecure-localhost通過chromeOptions()如下:

                  'goog:chromeOptions': {'args': ['--allow-insecure-localhost'],擴展":[]}

                  <小時>

                  但是,您的主要問題似乎在于您設置 platformcapabilities 被設置為 ANY如下:

                  {'acceptInsecureCerts': True,瀏覽器名稱":鉻",'goog:chromeOptions': {'args': ['--ignore-certificate-errors'],'擴展':[]},平臺":任何",'版本': ''}

                  根據 WebDriver - W3C Living Document platformName 部分提到,以下平臺名稱是常用的,具有易于理解的語義,并且在匹配功能時,可以通過將它們視為知名操作系統的有效同義詞來實現最大的互操作性:

                  鑰匙系統--- ------linux" 任何基于 Linux 內核的服務器或桌面系統."mac" Apple macOS 的任何版本.windows" Microsoft Windows 的任何版本,包括桌面版和移動版.

                  注意:此列表并不詳盡.

                  從新會話返回功能時,返回更具體的平臺名稱是有效的,允許用戶正確識別運行 WebDriver 實現的操作系統.

                  因此,不是在 desiredCapabilities 對象中傳遞 "platform":"ANY",而是使用更具體的 "platform":"linux"將是更可取的方法.

                  <塊引用>

                  您可以在 帶有參數的 http POST 到/session 引發的 curl 錯誤:{desiredCapabilities":{browserName":chrome",platform":ANY" with Selenium 和 PHPUnit

                  <小時>

                  更多關于 ChromeDriverChromeSelenium Client vrsion 的信息將有助于我們以更好的方式分析問題.然而,根據 ChromeDriver 的歷史記錄,以下與處理 證書錯誤 相關的問題已在 ChromeDriver 的最后幾個版本中得到解決:

                  • 允許通過 DevTools 處理證書錯誤:作為 headlesschrome 無法針對 SSL 證書錯誤顯示 UI 警告 修復 已發布以公開錯誤作為 DevTools 事件并通過 DevTools 命令控制要采取的操作.
                  • 提供在 Chromedriver/Selenium for headless 中處理證書錯誤的能力:之前通過 CLI 開關控制的某些 安全相關選項Chromium 的 UI 版本(如 --ignore-certificate-errors)被靜默忽略,只能通過 devtools 設置.因此有必要在瀏覽器目標 DevTools 客戶端上覆蓋和處理 certificateError 事件.修復已發布,實現了使用新的 DevTools 方法來覆蓋證書錯誤處理瀏覽器范圍內也允許在無頭模式下忽略證書錯誤.
                  • 通過 DevTools 處理全局證書錯誤:以前允許使用 DevTools處理單個目標/WebContents 的證書錯誤,但是當創建新目標時(例如單擊 target=_blank 鏈接),通常不可能發送 Security.enable/Security.setOverrideCertificateErrors 命令在嘗試導航之前足夠快.修復 發布了一個更簡單的忽略所有證書錯誤"模式,而不是棄用舊的覆蓋命令支持新的 setIgnoreCertificateErrors 命令,該命令還公開了瀏覽器目標上的安全域,以便于在整個瀏覽器中全局應用此覆蓋.
                  <小時>

                  結論

                  • 確保添加了以下參數/功能:
                    • --allow-insecure-localhost
                    • acceptInsecureCerts
                    • --ignore-certificate-errors
                  • 當您使用 'chromedriverVersion': '74.0.3729.6' 時,請確保您也在使用 'chrome': '74.0'(根據 ChromeDriver v74.0.3729.6 發行說明)
                  • 確保您使用的是最新發布的 Selenium v??3.141.59 客戶端.

                  I'm trying to run integration tests on a local host (with no HTTPS) using selenium with ChromeDriver.

                  Chrome requires an https certificate, but from this question i understand that i can circumvent this using the arg --ignore-certificate-errors

                  I have also added to my capabilities acceptInsecureCerts, as this seems like the appropriate course of action (docs)

                  The response from the chromedriver is still not what I was expecting:

                  This site can’t provide a secure connection app sent an invalid response. ERR_SSL_PROTOCOL_ERROR

                  My code is below:

                  from selenium import webdriver
                  from selenium.webdriver.chrome.options import Options
                  
                  # make options (principally to ignore certificate)
                  options = webdriver.ChromeOptions()
                  options.add_argument('--ignore-certificate-errors')
                  
                  # add acceptInsecureCerts
                  capabilities = options.to_capabilities()
                  capabilities['acceptInsecureCerts'] = True
                  
                  print(capabilities) # see below
                  
                  driver = webdriver.Remote(
                      command_executor=SELENIUM_HUB,
                      desired_capabilities=capabilities
                  )
                  print(driver.__dict__) # see further below
                  
                  app_login_url = 'http://app:8000/accounts/login/'
                  
                  driver.get(app_login_url)
                  

                  My capabilities:

                  {'acceptInsecureCerts': True,
                  'browserName': 'chrome',
                  'goog:chromeOptions': {'args': ['--ignore-certificate-errors'],
                                          'extensions': []},
                  'platform': 'ANY',
                  'version': ''}
                  

                  Here is my driver info, it looks like only the acceptInsecureCerts arg has been taken into account:

                  {'_file_detector': <selenium.webdriver.remote.file_detector.LocalFileDetector object at 0x7fb42bde10f0>,
                  '_is_remote': True,
                  '_mobile': <selenium.webdriver.remote.mobile.Mobile object at 0x7fb42bb5e400>,
                  '_switch_to': <selenium.webdriver.remote.switch_to.SwitchTo object at 0x7fb42bdd4898>,
                  'capabilities': {'acceptInsecureCerts': True,
                                  'acceptSslCerts': True,
                                  'applicationCacheEnabled': False,
                                  'browserConnectionEnabled': False,
                                  'browserName': 'chrome',
                                  'chrome': {'chromedriverVersion': '74.0.3729.6 '
                                                                      '(255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29})',
                                              'userDataDir': '/tmp/.com.google.Chrome.vc1ZvB'},
                                  'cssSelectorsEnabled': True,
                                  'databaseEnabled': False,
                                  'goog:chromeOptions': {'debuggerAddress': 'localhost:40815'},
                                  'handlesAlerts': True,
                                  'hasTouchScreen': False,
                                  'javascriptEnabled': True,
                                  'locationContextEnabled': True,
                                  'mobileEmulationEnabled': False,
                                  'nativeEvents': True,
                                  'networkConnectionEnabled': False,
                                  'pageLoadStrategy': 'normal',
                                  'platform': 'Linux',
                                  'proxy': {},
                                  'rotatable': False,
                                  'setWindowRect': True,
                                  'strictFileInteractability': False,
                                  'takesHeapSnapshot': True,
                                  'takesScreenshot': True,
                                  'timeouts': {'implicit': 0,
                                              'pageLoad': 300000,
                                              'script': 30000},
                                  'unexpectedAlertBehaviour': 'ignore',
                                  'version': '74.0.3729.169',
                                  'webStorageEnabled': True,
                                  'webdriver.remote.sessionid': '1cf77f237e966bac6ca15d4d9c107423'},
                  'command_executor': <selenium.webdriver.remote.remote_connection.RemoteConnection object at 0x7fb42be0cf98>,
                  'error_handler': <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fb427d08a20>,
                  'session_id': '1cf77f237e966bac6ca15d4d9c107423',
                  'w3c': False}
                  

                  Why am i still seeing the ERR_SSL_PROTOCOL_ERROR ?

                  解決方案

                  This error message...

                  This site can’t provide a secure connection app sent an invalid response. ERR_SSL_PROTOCOL_ERROR
                  

                  ...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session on your localhost.

                  As you are seeing this issue on your local host (with no HTTPS) as per this comment a blind fold solution would be to add the argument --allow-insecure-localhost through chromeOptions() as follows:

                  'goog:chromeOptions': {'args': ['--allow-insecure-localhost'],
                              'extensions': []}
                  


                  However your main issue seems to be with the capabilities where you have set platform being set s ANY as follows:

                  {'acceptInsecureCerts': True,
                  'browserName': 'chrome',
                  'goog:chromeOptions': {'args': ['--ignore-certificate-errors'],
                              'extensions': []},
                  'platform': 'ANY',
                  'version': ''}
                  

                  As per WebDriver - W3C Living Document the platformName section mentions, the following platform names are in common usage with well-understood semantics and, when matching capabilities, greatest interoperability can be achieved by honoring them as valid synonyms for well-known Operating Systems:

                  Key         System
                  ---         ------
                  "linux"     Any server or desktop system based upon the Linux kernel.
                  "mac"       Any version of Apple’s macOS.
                  "windows"   Any version of Microsoft Windows, including desktop and mobile versions.
                  

                  Note:This list is not exhaustive.

                  When returning capabilities from New Session, it is valid to return a more specific platformName, allowing users to correctly identify the Operating System the WebDriver implementation is running on.

                  So instead of passing "platform":"ANY" within the desiredCapabilities object, a more specific "platform":"linux" will be more desirable approach.

                  You can find a relevant and related discussion in Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY" with Selenium and PHPUnit


                  Some more information about the ChromeDriver, Chrome and Selenium Client vrsion would have helped us to analyze the issue in a better way. However as per ChromeDriver history the following issues related to handling of certificate errors were addressed in the last few releases of ChromeDriver:

                  • Allow handling certificate errors via DevTools: As the headless chrome cannot show a UI warning for SSL certificate errors a fix was released to expose the errors as DevTools events and control the action to take through a DevTools command.
                  • Provide ability to handle certificate errors in Chromedriver/Selenium for headless: Earlier certain security related options that was controlled via CLI switches in the UI version of Chromium (like --ignore-certificate-errors) were silently ignored and can only be set via devtools. So it was necessary to override and handle certificateError events on the browser-target DevTools client. A fix was released implementing the usage of the new DevTools method to override certificate error handling browser-wide which allowed ignoring certificate errors in headless mode too.
                  • Global certificate error handling via DevTools: Previously DevTools allowed handling certificate errors for individual targets / WebContents, but when a new target was created (e.g. clicking on a target=_blank link), it was not often not possible to send the Security.enable / Security.setOverrideCertificateErrors commands quickly enough before a navigation is attempted. A fix was published with a simpler "ignore all cert errors" mode instead deprecated the old override command in favor of a new setIgnoreCertificateErrors command which also exposes the Security domain on the browser target to facilitate applying this override globally for the whole browser.

                  Conclusion

                  • Ensure that the following arguments/capabilities are added:
                    • --allow-insecure-localhost
                    • acceptInsecureCerts
                    • --ignore-certificate-errors
                  • As you are using 'chromedriverVersion': '74.0.3729.6' ensure that you are also using 'chrome': '74.0' (as per ChromeDriver v74.0.3729.6 Release Notes)
                  • Ensure that you are using the latest released Selenium v3.141.59 clients.

                  這篇關于ChromeDriver ERR_SSL_PROTOCOL_ERROR 盡管 --ignore-certificate-errors的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

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

                    <tbody id='RF0AL'></tbody>

                  <legend id='RF0AL'><style id='RF0AL'><dir id='RF0AL'><q id='RF0AL'></q></dir></style></legend>
                  • <bdo id='RF0AL'></bdo><ul id='RF0AL'></ul>
                      <tfoot id='RF0AL'></tfoot>
                      • <small id='RF0AL'></small><noframes id='RF0AL'>

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

                            主站蜘蛛池模板: 久久久久亚洲 | 免费黄色网址视频 | 久久er精品 | 精品一区二区观看 | 粉嫩高清一区二区三区 | 久久亚洲一区二区三 | 亚洲成年影院 | 91av在线免费看 | 国产高清在线 | 日本中文在线 | 日韩中文字幕网 | 成人在线免费观看视频 | 蜜臀久久99精品久久久久野外 | 91综合在线观看 | 亚洲三区在线播放 | 亚洲成人网在线播放 | 亚洲网站在线观看 | 超碰97人人人人人蜜桃 | 日韩欧美国产一区二区 | 麻豆成人在线视频 | 国产福利资源在线 | 99精品久久 | 日本福利一区 | 91视频久久 | 中文字幕在线播放第一页 | 成人日韩精品 | 在线看亚洲 | va精品| 蜜臀av日日欢夜夜爽一区 | 午夜电影一区二区 | 日本在线一二 | 日本激情视频在线播放 | 精品三级在线观看 | 一级欧美视频 | 亚洲国产网 | 毛片网站在线观看视频 | 秋霞a级毛片在线看 | 国产亚洲成av人片在线观看桃 | 福利一区二区在线 | 看毛片网站| 国产乱码精品1区2区3区 |