Selenium Webdriver:目标url格式不正确

Selenium Webdriver:目标url格式不正确,selenium,selenium-webdriver,Selenium,Selenium Webdriver,我已将URL存储在excel文件中。我阅读了excel文件,并将url放在java属性中。我从属性中检索url并尝试启动它,但出现错误“目标url格式不正确”。请帮助 Properties pInputOutPut= new Properties(); //here i have code to read the excel file and load the url to properties _driver.get(pInputOutPut.getProperty("Url")); 您确

我已将URL存储在excel文件中。我阅读了excel文件,并将url放在java属性中。我从属性中检索url并尝试启动它,但出现错误“目标url格式不正确”。请帮助

Properties pInputOutPut= new Properties();
//here i have code to read the excel file and load the url to properties 
_driver.get(pInputOutPut.getProperty("Url"));

您确定字符串中没有不可见的特殊字符吗?Microsoft产品往往会添加比预期更多的内容

此问题自行解决!!。我尝试了两个不同的url,它工作了,然后我切换回了我原来的url,它也工作了。

我通过在我的url中添加(http/https)前缀解决了这个问题,当我遇到这个错误时,这些前缀丢失了。希望这有帮助