国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Selenium自動化chrome驅(qū)動版本匹配但是調(diào)用瀏覽器失?。篛nly local connections are allowed. 問題解決

這篇具有很好參考價(jià)值的文章主要介紹了Selenium自動化chrome驅(qū)動版本匹配但是調(diào)用瀏覽器失?。篛nly local connections are allowed. 問題解決。希望對大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

第一次發(fā)現(xiàn)這種情況,驅(qū)動版本完全對的上,但是調(diào)用 chrome 就提示 Only local connections are allowed. 然后瀏覽器調(diào)用失敗報(bào)錯(cuò)。

Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver s
afe.
ChromeDriver was started successfully.

解決方法:
調(diào)用 chrome 驅(qū)動的時(shí)候加個(gè)參數(shù) --whitelisted-ips="",值為空就是把所有調(diào)入來源都加入白名單。
ips 的全稱是 intrusion prevention system,解釋為入侵防御系統(tǒng)。

C:\Selenium2.0\driver>chromedriver_70.0.3538.97_win32.exe --whitelisted-ips=""
Starting ChromeDriver 70.0.3538.97 (d035916fe243477005bc95fe2a5778b8f20b6ae1) on port 9515
All remote connections are allowed. Use a whitelist instead!

如果是封裝好的不能代碼里集成,可以外部 cmd 窗口里啟用驅(qū)動,后面加上這個(gè)參數(shù),注意參數(shù)前要有個(gè)空格,注意窗口不要關(guān),不然就失效了,可以保證啟用過程中可以正常的調(diào)用 chrome
如果每次都這么做,可以創(chuàng)建個(gè)快捷方式,里面寫好參數(shù),這樣就每次執(zhí)行個(gè)快捷方式就完事了。
Selenium自動化chrome驅(qū)動版本匹配但是調(diào)用瀏覽器失?。篛nly local connections are allowed. 問題解決
詳細(xì)報(bào)錯(cuò)內(nèi)容展示:
老版本和新版本的報(bào)錯(cuò)內(nèi)容存在一定差異。
Selenium自動化chrome驅(qū)動版本匹配但是調(diào)用瀏覽器失?。篛nly local connections are allowed. 問題解決

Only local connections are allowed.
Exception in thread "AWT-EventQueue-0" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'DESKTOP-1MPSR34', ip: '10.6.255.208', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: SeleniumDriver
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:622)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:174)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:163)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:152)
        at com.yyuap.selenium.SeleniumDriver.initDriver(SeleniumDriver.java:195)
        at com.yyuap.selenium.Debuger.init(Debuger.java:256)
        at com.yyuap.selenium.Debuger.actionPerformed(Debuger.java:124)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
        at java.awt.Component.processMouseEvent(Component.java:6533)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
        at java.awt.Component.processEvent(Component.java:6298)
        at java.awt.Container.processEvent(Container.java:2236)
        at java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.awt.Container.dispatchEventImpl(Container.java:2294)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
        at java.awt.Container.dispatchEventImpl(Container.java:2280)
        at java.awt.Window.dispatchEventImpl(Window.java:2746)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.awt.EventQueue$4.run(EventQueue.java:729)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.IllegalStateException: The process has not exited yet therefore no result is available ...
        at org.apache.commons.exec.DefaultExecuteResultHandler.getException(DefaultExecuteResultHandler.java:76)
        at org.openqa.selenium.os.UnixProcess.checkForError(UnixProcess.java:173)
        at org.openqa.selenium.os.CommandLine.checkForError(CommandLine.java:185)
        at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:177)
        at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:166)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
        ... 45 more

喜歡的點(diǎn)個(gè)贊?吧!文章來源地址http://www.zghlxwxcb.cn/news/detail-505913.html

到了這里,關(guān)于Selenium自動化chrome驅(qū)動版本匹配但是調(diào)用瀏覽器失敗:Only local connections are allowed. 問題解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • selenium自動化chrome

    chrome_options = webdriver.ChromeOptions() - 創(chuàng)建 Chrome 瀏覽器的選項(xiàng)對象。 chrome_options.binary_location = r\\\"C:Program FilesGoogleChromeApplicationchrome.exe\\\" - 指定 Chrome 瀏覽器的二進(jìn)制文件路徑。 chrome_options.add_argument(\\\'--disable-gpu\\\') - 禁用 GPU 加速,可以提高腳本在瀏覽器中的穩(wěn)定性和性能。 chrom

    2024年02月09日
    瀏覽(20)
  • 【Selenium】chromedriver最新版本與Chrome自動更新版本不匹配問題

    【Selenium】chromedriver最新版本與Chrome自動更新版本不匹配問題

    使用Selenium時(shí)需要下載chromedriver 1、首先查看我的Chrome瀏覽器版本已自動更新到116: 2、查找與之對應(yīng)的chromedriver版本:http://chromedriver.storage.googleapis.com/index.html 發(fā)現(xiàn)最新版本只到114: chromedriver與Chrome版本不匹配且沒有匹配最新Chrome版本的chromedriver。 因此考慮降級Chrome版本且

    2024年02月16日
    瀏覽(22)
  • 【Selenium】chromedriver新版本與Chrome自動更新版本不匹配問題

    【Selenium】chromedriver新版本與Chrome自動更新版本不匹配問題

    python代碼運(yùn)行出現(xiàn)如下錯(cuò)誤:This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.141 with binary path C:Program FilesGoogleChromeApplicationchrome.exe 解決方案: 1.查看當(dāng)前Google瀏覽器版本:版本 116.0.5845.141(正式版本) (64 位) 2.下載對應(yīng)的瀏覽器驅(qū)動chromed

    2024年02月08日
    瀏覽(25)
  • 使用Selenium控制Chrome瀏覽器 --工作自動化

    使用Selenium控制Chrome瀏覽器 --工作自動化

    使用Selenium控制Chrome瀏覽器 --工作自動化 最近朋友在用秒賬做帳時(shí),由于銷售單量很大,重復(fù)錄入工作一天一錄就近五個(gè)小時(shí),尋求幫助,問能不能把這重復(fù)勞動減少些,看后分析,使用web自動化,應(yīng)能解決問題,特此記錄如下: ?Selenium 簡介:Selenium 是一套完整的web應(yīng)用程

    2024年02月01日
    瀏覽(87)
  • Python selenium自動化操作Chrome瀏覽器

    Python selenium自動化操作Chrome瀏覽器

    ? ? 活動地址:CSDN21天學(xué)習(xí)挑戰(zhàn)賽 Selenium是一個(gè)用于Web應(yīng)用程序測試的工具。Selenium測試直接運(yùn)行在瀏覽器中,就像真正的用戶在操作一樣。支持目前比較主流的瀏覽器。它也實(shí)現(xiàn)了諸多自動化功能,比如軟件自動化測試,檢測軟件與瀏覽器兼容性,自動錄制、生成不同語言

    2024年02月02日
    瀏覽(94)
  • Python+Selenium3+Chrome自動化測試環(huán)境搭建

    寫在最前面,因?yàn)楦鞣N原因,搭建該環(huán)境方法多種多樣。在本教程中,展示環(huán)境搭建的詳細(xì)步驟。在不同軟硬件環(huán)境下安裝報(bào)錯(cuò),可找出原因,百度排錯(cuò)。 本博客的具體操作視頻請移步B站: https://www.bilibili.com/video/BV1oe4y1w7yr/?spm_id_from=333.999.list.card_archive.clickvd_source=585bb8c205

    2024年02月02日
    瀏覽(35)
  • Debian/Ubuntu 安裝 Chrome 和 Chrome Driver 并使用 selenium 自動化測試

    Debian/Ubuntu 安裝 Chrome 和 Chrome Driver 并使用 selenium 自動化測試

    截至目前,Chrome 仍是最好用的瀏覽器,沒有之一。Chrome 不僅是日常使用的利器,通過 Chrome Driver 驅(qū)動和 selenium 等工具包,在執(zhí)行自動任務(wù)中也是一絕。相信大家對 selenium 在 Windows 的配置使用已經(jīng)有所了解了,下面就讓我們看看如何在 Linux 上配置使用 selenium 吧( 無圖形化界

    2024年02月14日
    瀏覽(40)
  • UI自動化環(huán)境的搭建(python+pycharm+selenium+chrome)

    UI自動化環(huán)境的搭建(python+pycharm+selenium+chrome)

    最近在做一些UI自動化的項(xiàng)目,為此從環(huán)境搭建來從0到1,希望能夠幫助到你,同時(shí)也是自我的梳理。將按照如下進(jìn)行開展: 1、python的下載、安裝,python環(huán)境變量的配置。 2、pycharm開發(fā)工具的下載安裝。 3、selenium的安裝。 4、chrome的選擇。 一、python的下載。 1、去python官網(wǎng):

    2024年02月13日
    瀏覽(33)
  • 【selenium】自動化使用 chrome 的 user-data-dir

    jwensh@2023.12.18 用戶數(shù)據(jù)目錄包含配置文件數(shù)據(jù),例如歷史記錄、書簽和 cookie,以及其他每次安裝的本地狀態(tài)。 每個(gè)配置文件都是用戶數(shù)據(jù)目錄中的一個(gè)子目錄(通常為Default)。 我們在使用 selenium 進(jìn)行 chrome 操作自動化的時(shí)候,有時(shí)候會用到 extends 插件,也就是 我們需要了

    2024年02月04日
    瀏覽(22)
  • java + Selenium 實(shí)現(xiàn)自動化測試,模擬人手點(diǎn)擊操作 chrome 瀏覽器

    引入 maven 依賴: 安裝 chromeDriver:略 SeleniumUtils.java: ChromeDriverUtils.java: 使用示例:

    2024年02月11日
    瀏覽(25)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包