当前位置: 首页 > 知识库问答 >
问题:

WebDriverError:45000 ms后无法连接到端口7055上的主机127.0.0.1

芮叶秋
2023-03-14

Selenium在Firefox中运行量角器测试时未启动。依赖版本详细信息指定如下:

让我知道哪里出了问题,我错过了什么?

节点版本:v4.3.1

量角器版本:3.2.1业力版本:0.13.21

Selenium版本:2.52.0火狐版本:47.0.1

Firefox控制台输出:

C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\error.js:27
    super(opt_error);
         ^
WebDriverError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
MlocE","location":"winreg-app-global","version":"15.1.0","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":"chrome://vscore/content/ScriptFF.gif","icon64URL":null,"defaultLocale":{"name":"McAfee ScriptScan for Firefox","description":null,"creator":"McAfee, Inc.","homepageURL":null},"visible":true,"active":false,"userDisabled":true,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Common Files\\McAfee\\SystemCore","installDate":1465363824840,"updateDate":1465363824840,"applyBackgroundUpdates":1,"bootstrap":false,"skinnable":false,"size":2695168,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"1.5","m
1467645009572   DeferredSave.extensions.json    DEBUG   Save changes
1467645009572   addons.xpi      DEBUG   Updating database with changes to installed add-ons
1467645009572   addons.xpi-utils        DEBUG   Updating add-on states
1467645009579   addons.xpi-utils        DEBUG   Writing add-ons list
1467645009586   addons.xpi      DEBUG   Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1467645009587   addons.xpi      DEBUG   Calling bootstrap method startup on e10srollout@mozilla.org version 1.0
1467645009587   addons.xpi      DEBUG   Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1467645009588   addons.xpi      DEBUG   Calling bootstrap method startup on firefox@getpocket.com version 1.0.2
1467645009589   addons.xpi      DEBUG   Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
1467645009590   addons.xpi      DEBUG   Calling bootstrap method startup on loop@mozilla.org version 1.3.2
1467645009609   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
1467645009609   addons.manager  DEBUG   Provider finished startup: XPIProvider
1467645009610   addons.manager  DEBUG   Starting provider: LightweightThemeManager
1467645009610   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
1467645009610   addons.manager  DEBUG   Provider finished startup: LightweightThemeManager
1467645009610   addons.manager  DEBUG   Starting provider: GMPProvider
1467645009616   addons.manager  DEBUG   Registering shutdown blocker for GMPProvider
1467645009617   addons.manager  DEBUG   Provider finished startup: GMPProvider
1467645009617   addons.manager  DEBUG   Starting provider: PluginProvider
1467645009617   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
1467645009617   addons.manager  DEBUG   Provider finished startup: PluginProvider
1467645009618   addons.manager  DEBUG   Completed startup sequence
1467645009955   addons.manager  DEBUG   Starting provider: <unnamed-provider>
1467645009955   addons.manager  DEBUG   Registering shutdown blocker for <unnamed-provider>
1467645009955   addons.manager  DEBUG   Provider finished startup: <unnamed-provider>
1467645010210   DeferredSave.extensions.json    DEBUG   Write succeeded
1467645010210   addons.xpi-utils        DEBUG   XPI Database saved, setting schema version preference to 17
1467645010210   DeferredSave.extensions.json    DEBUG   Starting timer
1467645010247   DeferredSave.extensions.json    DEBUG   Starting write
1467645010259   addons.repository       DEBUG   No addons.json found.
1467645010260   DeferredSave.addons.json        DEBUG   Save changes
1467645010263   DeferredSave.addons.json        DEBUG   Starting timer
1467645010426   addons.manager  DEBUG   Starting provider: PreviousExperimentProvider
1467645010426   addons.manager  DEBUG   Registering shutdown blocker for PreviousExperimentProvider
1467645010426   addons.manager  DEBUG   Provider finished startup: PreviousExperimentProvider
1467645010431   DeferredSave.addons.json        DEBUG   Starting write
1467645010455   DeferredSave.extensions.json    DEBUG   Write succeeded
1467645010505   DeferredSave.addons.json        DEBUG   Write succeeded

    at WebDriverError (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\error.js:27:10)
    at Object.checkLegacyResponse (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\error.js:580:13)
    at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:64:13
    at Promise.invokeCallback_ (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1329:14)
    at TaskQueue.execute_ (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2790:14)
    at TaskQueue.executeNext_ (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2773:21)
    at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2652:27
    at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
    at process._tickCallback (node.js:364:9)
From: Task: WebDriver.createSession()
    at acquireSession (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:62:22)
    at Function.createSession (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:295:12)
    at Builder.build (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\builder.js:458:24)
    at [object Object].DriverProvider.getNewDriver (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\driverProvider.js:42:27)
    at [object Object].Runner.createBrowser (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\built\runner.js:203:37)
    at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\built\runner.js:293:21
    at _fulfilled (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
    at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:604:44
[launcher] Process exited with error code 1

共有1个答案

邴越彬
2023-03-14

Firefox47与selenium webdriver 2.53存在兼容性问题(您有2.52,但我认为这仍然是一个问题)。您需要将Firefox降级到46.0.1,或者安装包含该修复程序的Firefox最新开发版本。

或者/和,您应该将Protractor升级到最新版本(目前是3.3.0),这将自带最新的selenium-webdriver包(注意:Protractor尝试与selenium-webdriver中的最新更新同步,但3.3.0具体依赖于相同的2.52.0,而另一个版本是2.53.2,下一个3.4.0将安装该版本)。

 类似资料:
  • 在我的eclipse中运行代码(Selenium webDrive/java);但它显示错误45000毫秒后无法连接到端口7055上的主机127.0.0.1。Firefox控制台输出"......代码和错误的截图

  • 我是一个新手,需要一些帮助。. 我正在使用Selenium 2.2.0和FF v7。Windows XP上的0.1 我已经成功地在IE中录制并回放了一个java脚本,但是每当我尝试在FF中执行相同的脚本时,我都会收到以下错误消息: 45000 ms后无法连接到端口7055上的主机127.0.0.1 我在很多地方读到,如果我将firefox版本降级到3.6,脚本将运行良好,但我并不热衷于降级。有人能

  • 我收到一个错误:无法连接到端口7055上的主机127.0.0.1 当我尝试在ubuntu服务器上用firefox运行selenium时。 谁能帮忙吗? 我有硒版2.53

  • 我有一个测试箱。看起来Jenkins将ssh插入并执行正在运行的特定作业中描述的命令。 在这里,我试图运行我的Selenium Webdriver测试,但它告诉我在启动Firefox时有错误。最后的想法是在这个盒子上完全运行webtests,并且还拍摄一些错误的截图。 我使用的是selenium-java-2.25.jar、Firefox10、linux操作系统。 有趣的是,我可以将ssh手动插入

  • Firefox控制台输出: 45000 ms后无法连接到端口7055上的主机127.0.0.1。 我一直在尽我所能。请有人能帮助我的版本和maven项目的依赖集;我正在使用Java。

  • 我正试着用量角器(通过grunt)在Travis-CI上运行。当我在本地运行测试时,我的测试成功运行,但是我在Travis-CI上不断遇到以下错误。提前道谢。 下面是我的完整项目,以备需要其他文件时使用:https://github.com/crobby/oshinko-console/tree/travis-integration $grunt测试-集成--baseURL=https:/${IP