`
我是温浩然
  • 浏览: 104792 次
文章分类
社区版块
存档分类
最新评论

自动化测试研究,chromedriver.exe 版本不行

 
阅读更多

前提条件,

1、我的电脑是已经配置了代理,可以的。

而且,关闭所有软件,清除缓存,清除浏览器、代理设置,,,,某些本来应该可以访问的网站,比如cucumberjs seleniumjs 等等网站,也是不能访问状态。

2、何总给的demo ,我的台式机 启动报错。

其他的电脑,在maven 命令启动报错, grunt firefox 启动报错。

但是,我的台式机 grunt chrome 启动也是报错的,错误如下:

Running "env:chrome" (env) task

Running "jshint:all" (jshint) task
>> 8 files lint free.

Running "exec:run_chrome" (exec) task
Feature: 法律社项目,印务测试用例                                                                                                                                                                                                                                                                                    

    材料出库测试                                                                                                                                                                                                                                                                                                     

  @first
  Scenario: xin jian li xiang shen qing
shalei
  √ Given use name "shalei" pwd "shalei" login system                                                                                                                                                                                                                                                               
  √ Then open the to do item                                                                                                                                                                                                                                                                                        
  √ Then open all tasks                                                                                                                                                                                                                                                                                             
  √ Given open task by                                                                                                                                                                                                                                                                                              
  √ When open sort                                                                                                                                                                                                                                                                                                  
  √ Then open float                                                                                                                                                                                                                                                                                                 
  √ Then According to the task information "编印务流程-纸质图书-123123" and task name "新建立项申请" to handle the process                                                                                                                                                                                                         

Failures:

1) Scenario: xin jian li xiang shen qing - features\float-test.feature:21
   Step: After 
   Step Definition: features\support\hooks.js:10
   Message:
     Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:54536
         at ClientRequest.<anonymous> (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\http\index.js:381:15)
         at emitOne (events.js:77:13)
         at ClientRequest.emit (events.js:169:7)
         at Socket.socketErrorListener (_http_client.js:269:9)
         at emitOne (events.js:77:13)
         at Socket.emit (events.js:169:7)
         at emitErrorNT (net.js:1269:8)
         at nextTickCallbackWith2Args (node.js:442:9)
         at process._tickCallback (node.js:356:17)
     From: Task: WebDriver.manage().window().setSize(1920, 1080)
         at Driver.schedule (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:377:17)
         at Window.setSize (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:1402:25)
         at Object.<anonymous> (W:\AutoTestProject\LawEditorial-autotest\features\support\world.js:24:26)
         at Module._compile (module.js:409:26)
         at Object.Module._extensions..js (module.js:416:10)
         at Module.load (module.js:343:32)
         at Function.Module._load (module.js:300:12)
         at Module.require (module.js:353:17)
         at require (internal/module.js:12:17)
         at Object.module.exports (W:\AutoTestProject\LawEditorial-autotest\features\step_definitions\base.step.js:8:15)

1 scenario (1 failed)
7 steps (7 passed)
0m02.665s
>> W:\AutoTestProject\LawEditorial-autotest\node_modules\cucumber\lib\cucumber\runtime\event_broadcaster.js:30
>>             throw error;
>>             ^
>> 
>> Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:54536
>>     at ClientRequest.<anonymous> (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\http\index.js:381:15)
>>     at emitOne (events.js:77:13)
>>     at ClientRequest.emit (events.js:169:7)
>>     at Socket.socketErrorListener (_http_client.js:269:9)
>>     at emitOne (events.js:77:13)
>>     at Socket.emit (events.js:169:7)
>>     at emitErrorNT (net.js:1269:8)
>>     at nextTickCallbackWith2Args (node.js:442:9)
>>     at process._tickCallback (node.js:356:17)
>> From: Task: WebDriver.quit()
>>     at Driver.schedule (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:377:17)
>>     at Driver.quit (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:443:23)
>>     at W:\AutoTestProject\LawEditorial-autotest\features\support\hooks.js:26:11
>>     at nextTickCallbackWith0Args (node.js:420:9)
>>     at Immediate._tickCallback [as _onImmediate] (node.js:349:13)
>>     at processImmediate [as _immediateCallback] (timers.js:383:17)
>> Exited with code: 7.
Warning: Task "exec:run_chrome" failed. Use --force to continue.

Aborted due to warnings.


一直以为是代理问题,在 proxy.js 文件中设置了很长时间不能用。

也在 work.js 启动 driver 里面 也设置了,还是不行。


用 grunt chrome 命令启动测试用例,曾经偶尔成功过,不知道因为啥原因后来也不行了。

今天看见两篇文章,链接如下。

https://bugs.chromium.org/p/chromedriver/issues/detail?id=1451


https://bugs.chromium.org/p/chromedriver/issues/detail?id=1504


把chromedriver.exe版本换成 2.24 就没有问题了。


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics