gpt4 book ai didi

node.js - 带 Protractor 的 Sauce Labs,URI 格式错误

转载 作者:太空宇宙 更新时间:2023-11-03 22:28:41 24 4
gpt4 key购买 nike

我的 Protractor 配置是:

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

有人在运行测试时遇到过这个问题吗?这对我来说是一个非常奇怪的行为......不幸的是找不到例子。

最佳答案

我能够通过在 sauceUsersauceKey 中使用错误编码的字符来复制您的错误。你能检查一下你的配置中是否有这样的字符吗?

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 中的这个问题已在 nodejs git issue 中进行了解释

I just ran into this error when a client encoded 'ê' as '%EA' and an 'é' as "%E9" and then sent them to my node server. Attempting to decode either of them result in the uri malformed error:

decodeURIComponent("%EA"); URIError: URI malformed at decodeURIComponent (native) at repl:1:1

关于node.js - 带 Protractor 的 Sauce Labs,URI 格式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41426482/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com