【问题标题】:Protractor Framework setup量角器框架设置
【发布时间】:2018-02-21 00:05:34
【问题描述】:

在设置量角器时,尝试启动 webdriver manager 时遇到以下错误:

C:\ang\Angular_modules\node_modules>webdriver-manager start
[05:55:09] I/start - java -Dwebdriver.chrome.driver=\\usatlkilne01-ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.35.exe -Dwebdriver.gecko.driver=\\usatlkilne01-ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.19.1.exe -jar \\usatlkilne01-ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.9.1.jar -port 4444
[05:55:09] I/start - seleniumProcess.pid: 15016
Error: Could not find or load main class org.openqa.grid.selenium.GridLauncherV3
Caused by: java.lang.ClassNotFoundException: org.openqa.grid.selenium.GridLauncherV3
[05:55:13] I/start - Selenium Standalone has exited with code 1

Java 版本 9.0.4 安装在我的机器上

请告诉我具体怎么做

【问题讨论】:

    标签: selenium selenium-webdriver protractor


    【解决方案1】:

    该错误确实给了我们一些提示,如下所示:

    [05:55:09] I/start - java -Dwebdriver.chrome.driver=\\usatlkilne01-ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.35.exe -Dwebdriver.gecko.driver=\\usatlkilne01-ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.19.1.exe -jar \\usatlkilne01-ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.9.1.jar -port 4444
    

    从错误跟踪日志看来:

    • Protractor 正在考虑将 chromedriver_2.35 作为 ChromeDriver 二进制文件(例如 chromedriver_2.35.exe

    • Protractor 正在考虑将 geckodriver-v0.19.1 作为 GeckoDriver 二进制文件(例如 geckodriver-v0.19.1.exe

    似乎,WebDriver 二进制文件的绝对位置不正确,或者您必须将二进制文件的名称更改为 默认 名称为 chromedriver.exe geckodriver.exe

    【讨论】:

    • 您好 Debanjan,感谢您的帮助。你能告诉我如何更改二进制文件的名称或更改 webdriver 的位置吗?我对此完全陌生
    • @Ash 只需交叉检查此路径,这些二进制文件是否存在。 \\usatlkilne01ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.35.exe -
    【解决方案2】:

    @Ash 似乎问题不在于您的网络驱动程序。而且您不想重命名网络驱动程序。我希望你在 Protractor conf.js 中设置了类似下面的内容。

    multiCapabilities: [{ 'browserName': 'firefox' }, { 'browserName': 'chrome' }]

    如果你把它改成capabilities: { 'browserName': 'firefox' } }

    capabilities: { 'browserName': 'chrome' }

    如果你真的想在多个浏览器上运行。 Please refer this page.

    如果这解决了,请尝试投票并将其作为正确答案。

    如果不能,您能否详细说明您的问题。

    你又做了一件事

    webdriver-manager update  
    

    在启动 webdriver-manager 之前?

    【讨论】:

      【解决方案3】:

      您的selenium-server-standalone-3.9.1.jar 似乎不是文件夹中的整体

      \\usatlkilne01-ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\,

      请尝试解压并尝试发现有一个类org.openqa.grid.selenium.GridLauncherV3

      删除当前selenium-server-standalone-3.9.1.jar,换一个新的。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-05-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-06-28
        • 1970-01-01
        相关资源
        最近更新 更多