英语不好的原因及解决方法(二)-不断补充中

日期: 栏目:文章分享 浏览:993 评论:0

不断添加。 .

0、maven 启动测试用例,报错。

错误日志如下。

************************LOG bigan************************ *** ****************

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:npm (npm install) on project aip-demo-webdriver.js: Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "W:\AutoTestProject\LawEditorial-autotest\node\node.exe" (in directory "W:\AutoTestProject\LawEditorial-autotest"): CreateProcess error=193, %1 ??????Ч?? Win32 ??ó -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

************************登录************************ ******************

这个错误有很多原因。 所以没找到解决办法,这也是英文不好的原因。

1、代理设置问题。

Win10系统,翻墙软件,启动翻墙软件后,启动项目一直报错Chrome 自动升级后,本地项目都无法访问,访问被拒绝,浏览器崩溃。

2、.exe 未找到。

您需要将 .exe 放在项目根目录中。否则会报错,让你下载.exe,

也可以配置路径指定.exe的目录(好像可以?)

或者,更改文件 \-\.js

更改第 183 行。

    let exe = opt_exe || io.findInPath(CHROMEDRIVER_EXE, true);
    //let exe = opt_exe || 'C:\\ASDF\\AAA\\chromedriver.ese';

被屏蔽的句子Chrome 自动升级后,本地项目都无法访问,替换没有被屏蔽的句子。

使用双反斜杠指定路径。

3、能跑,不能跑。

3.1、无需启动浏览器即可成功运行,秒退出,控制台报错。

因为你的版本太低,可以升级到48及以上版本。

3.2、可以运行,,秒不返回,但是不能运行,错误如下:

************************************************ 错误日志开始** **********************************************

Failures:
1) Scenario: Test The ideal of the topic - features\abc.feature:8
   Step: After 
   Step Definition: features\support\hooks.js:10
   Message:
     Error: Timed out waiting for the WebDriver server at http://127.0.0.1:49897/hub
         at Error (native)
         at onError (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\http\util.js:87:11)
         at ManagedPromise.invokeCallback_ (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:1379:14)
         at TaskQueue.execute_ (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:2913:14)
         at TaskQueue.executeNext_ (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:2896:21)
         at W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:2775:27
         at W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:639:7
         at process._tickCallback (node.js:369:9)
     From: Task: WebDriver.createSession()
         at Function.createSession (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:329:24)
         at Driver (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\firefox\index.js:386:38)
         at Builder.build (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\builder.js:467:16)
         at buildFirefoxdrive (W:\AutoTestProject\LawEditorial-autotest\features\support\world.js:15:37)
         at Object. (W:\AutoTestProject\LawEditorial-autotest\features\support\world.js:20:14)
         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)
     From: Task: WebDriver.manage().timeouts().implicitlyWait(50000)
         at Driver.schedule (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:377:17)
         at Timeouts.implicitlyWait (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:1287:25)
         at new World (W:\AutoTestProject\LawEditorial-autotest\features\support\world.js:38:28)
1 scenario (1 failed)
4 steps (4 passed)
0m46.457s
>> W:\AutoTestProject\LawEditorial-autotest\node_modules\cucumber\lib\cucumber\runtime\event_broadcaster.js:30
>>             throw error;
>>             ^
>> 
>> Error: Timed out waiting for the WebDriver server at http://127.0.0.1:49897/hub
>>     at Error (native)
>>     at onError (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\http\util.js:87:11)
>>     at ManagedPromise.invokeCallback_ (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:1379:14)
>>     at TaskQueue.execute_ (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:2913:14)
>>     at TaskQueue.executeNext_ (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:2896:21)
>>     at W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:2775:27
>>     at W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\promise.js:639:7
>>     at process._tickCallback (node.js:369:9)
>> From: Task: WebDriver.createSession()
>>     at Function.createSession (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:329:24)
>>     at Driver (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\firefox\index.js:386:38)
>>     at Builder.build (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\builder.js:467:16)
>>     at buildFirefoxdrive (W:\AutoTestProject\LawEditorial-autotest\features\support\world.js:15:37)
>>     at Object. (W:\AutoTestProject\LawEditorial-autotest\features\support\world.js:20:14)
>>     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)
>> From: Task: WebDriver.manage().timeouts().implicitlyWait(50000)
>>     at Driver.schedule (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:377:17)
>>     at Timeouts.implicitlyWait (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\lib\webdriver.js:1287:25)
>>     at new World (W:\AutoTestProject\LawEditorial-autotest\features\support\world.js:38:28)
>> 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 Driver.onQuit.quit (W:\AutoTestProject\LawEditorial-autotest\node_modules\selenium-webdriver\firefox\index.js:393:14)
>>     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)
>> Exited with code: 7.
Warning: Task "exec:run_firefox" failed. Use --force to continue.
Aborted due to warnings.

************************************************ 错误日志结束** **********************************************

这个错误有很多原因。

这个错误,我还没解决,-.-!

标签:

评论留言

我要留言

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。发布前请先查看评论规则:点我查看