在Linux上使用Nightwatch / Selenium运行IE测试

问题描述

我的任务是在IE 11上测试Vue应用程序。 我正在Linux(Ubuntu 18)操作系统上工作,我的浏览器测试是使用夜表运行的。

我该怎么办才能在IE 11上运行测试?

最后一个失败的nightwatch.json实验是:

"selenium": {
    "start_process": true,"port": 9515,"host": "localhost","server_path": "tests/selenium-server-standalone-3.9.1.jar","cli_args": {
        "webdriver.chrome.driver": "node_modules/chromedriver/lib/chromedriver/chromedriver","webdriver.ie.driver": "tests/IEDriverServer.exe"
    }
},....
"ie": {
        "desiredCapabilities": {
            "browserName": "internet explorer","elementScrollBehavior": 1,"javascriptEnabled": true,"acceptSslCerts": true
        }
    },

我的npm脚本命令是:

"test:ie": "LANGUAGE=de_DE.UTF-8 vue-cli-service test:e2e tests/e2e/main/specs --env ie"

像这样使用:

$ npm run test:ie

我收到的错误消息是:

⠙ Connecting to localhost on port 9515...
 Response 500 POST /wd/hub/session (152ms)
 {
   value: {
     stacktrace: '',message: 'Unable to create new service: InternetExplorerDriverService\n' +
     "Build info: version: '3.9.1',revision: '63f7b50',time: '2018-02-07T22:42:28.403Z'\n" +
     "System info: host: 'ericPC',ip: '127.0.1.1',os.name: 'Linux',os.arch: 'amd64',os.version: '5.4.0-52-generic',java.version: '1.8.0_272'\n" +
     'Driver info: driver.version: unkNown',error: 'session not created'
 },status: 33
⚠ Error connecting to localhost on port 9515.

在带有Virtual Box的VM上,我也可以使用IE 11。

那么,我该如何同时使用IE 11运行我的夜视测试?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)