Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/332.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java.net.URISyntaxException:索引7处的预期权限:http://_Java_Selenium - Fatal编程技术网

java.net.URISyntaxException:索引7处的预期权限:http://

java.net.URISyntaxException:索引7处的预期权限:http://,java,selenium,Java,Selenium,我得到一个错误: 原因:java.net.URISyntaxException:索引7处的预期权限: http:// 有关以下代码: try { return new RemoteWebDriver(new URL("http://" + username + ":" + authkey +"@hub.crossbrowsertesting.com:80/wd/hub"), caps); } catch (MalformedURLException e) { // TODO

我得到一个错误:

原因:java.net.URISyntaxException:索引7处的预期权限: http://

有关以下代码:

try 
{
    return new RemoteWebDriver(new URL("http://" + username + ":" + authkey +"@hub.crossbrowsertesting.com:80/wd/hub"), caps);
} 
catch (MalformedURLException e) 
{
    // TODO Auto-generated catch block
    e.printStackTrace();
    return null;
 }
堆栈跟踪:

驱动程序信息:Driver.version:RemoteWebDriver 位于org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:622) 位于org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241) 位于org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:128) 位于org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:155) 位于abc.testcase.LoginForm2.main(LoginForm2.java:45) 原因:org.apache.http.client.ClientProtocolException 位于org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186) 在org.apache.http.impl.client.CloseableHttpClient.execute上(CloseableHttpClient.java:71) 在org.apache.http.impl.client.CloseableHttpClient.execute上(CloseableHttpClient.java:55) 位于org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:142) 位于org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:88) 位于org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:108) 位于org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64) 位于org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141) 位于org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) ... 4更多 原因:org.apache.http.HttpException:无法将主机转换为URI:http:// 位于org.apache.http.impl.conn.SystemDefaultRoutePlanner.determineProxy(SystemDefaultRoutePlanner.java:77) 位于org.apache.http.impl.conn.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:77) 位于org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:124) 位于org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:183) ... 还有12个 原因:java.net.URISyntaxException:索引7处的预期权限:http:// 在java.net.URI$Parser.fail(URI.java:2848) 位于java.net.URI$Parser.failExpecting(URI.java:2854) 位于java.net.URI$Parser.parseHierarchy(URI.java:3102) 位于java.net.URI$Parser.parse(URI.java:3053) 位于java.net.URI。(URI.java:588) 位于org.apache.http.impl.conn.SystemDefaultRoutePlanner.determineProxy(SystemDefaultRoutePlanner.java:75) ... 还有15个


请帮忙

仅通过编码@by%40解决的错误

仅通过编码@by%40解决的错误

请显示相关字符串用户名的内容:xyz@abc.com和authkey:abc12cd34我在@Jens获得了示例代码,你能帮我检查一下吗。看这里:请显示相关字符串的内容用户名:xyz@abc.com和authkey:abc12cd34我在@Jens得到了示例代码,你能帮我检查一下吗。看这里: