我的量角器配置是:
exports.config = {
baseUrl: 'http://www.onet.pl',
directConnect: false,
sauceUser: 'myuser',
sauceKey: 'mypassword',
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['show-fps-counter=true', '--allow-running-insecure-content']
}
},
}
当我尝试启动测试时,我收到以下错误:
[12:57:56] I/sauce - Using SauceLabs selenium server at http://ondemand.saucelabs.com:80/wd/hub [12:57:56] I/launcher - Running 1 instances of WebDriver [12:57:56] E/launcher - URI malformed [12:57:56] E/launcher - URIError: URI malformed at decodeURIComponent (native) at Url.parse (url.js:275:19) at Object.urlParse [as parse] (url.js:81:5) at new HttpClient (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\http\index.js:221:25) at C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\executors.js:47:18 at ManagedPromise.invokeCallback_ (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:1379:14) at TaskQueue.execute_ (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:2913:14) at TaskQueue.executeNext_ (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:2896:21) at asyncRun (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:2820:25) at C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:639:7 [12:57:56] E/launcher - Process exited with error code 199
运行测试时遇到任何问题? 这对我来说是一种非常奇怪的行为...... 不幸的是,找不到任何例子。
答案 0 :(得分:0)
我能够通过sauceUser
或sauceKey
中错误编码的字符来复制您的错误。你能检查一下你的配置中是否有这样的字符吗?
sauceUser: 'myuser',
sauceKey: 'password%EA',
错误堆栈:
[14:41:46] I/sauce - Using SauceLabs selenium server at http://ondemand.saucelabs.com:80/wd/hub
[14:41:46] I/launcher - Running 1 instances of WebDriver
[14:41:46] E/launcher - URI malformed
[14:41:46] E/launcher - URIError: URI malformed
at decodeURIComponent (native)
at Url.parse (url.js:195:19)
at Object.urlParse [as parse] (url.js:84:5)
中已解释了nodeJs中的此问题
当客户端将'ê'编码为'%EA'时,我遇到了这个错误 'é'为“%E9”,然后将它们发送到我的节点服务器。试图 解码其中任何一个都会导致uri格式错误:
decodeURIComponent("%EA"); URIError: URI malformed at decodeURIComponent (native) at repl:1:1