当我试图使用selenium运行脚本时,我会得到以下错误
线程"main“org.openqa.selenium.WebDriverException中的异常: java.io.FileNotFoundException: d:\Shantu!(系统找不到指定的文件)构建信息:版本:'2.49.1',修订:'7203e46',时间:'2016-01-21 17:35:35:35‘系统信息:主机:'ghijkl-ab562296',ip:'192.168.43.128',os.name:'Windows XP',os.arch:'x86',os.version:'5.1',java.version:'1.8.0_40‘司机信息: driver.version: FirefoxDriver at java.version at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:85) at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:78) at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:67) at org.openqa.selenium.firefox.FirefoxDriverorg.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:264),org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:119),org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:218),org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:211),org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:207),org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:120) at practicePackage.New.main(New.java:11),由: java.io.FileNotFoundException: d:\Shantu!(系统找不到指定的文件)在java.util.zip.ZipFile.open(原生方法)在java.util.zip.ZipFile。(未知源)在java.util.zip.ZipFile。(未知源)在java.util.jar.JarFile。(未知源)在java.util.jar.JarFile。(未知源)在sun.net.www.protocol.jar.URLJarFile。(未知源)在sun.net.www.protocol.jar.URLJarFile。(未知源)在sun.net.www.protocol.jar.JarFileFactory.get(Unknown源)在sun.net.www.protocol.jar.JarURLConnection.connect(Unknown源)在sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown源)在java.net.URL.openStream(未知源)在org.openqa.selenium.firefox.FirefoxProfile.onlyOverrideThisIfYouKnowWhatYouAreDoing(FirefoxProfile.java:130) . 11
发布于 2016-01-25 13:53:24
当您试图使用您创建的特定firefox配置文件测试应用程序时,似乎会引发异常。
发布于 2016-01-25 19:24:54
当试图获得任何网址,我们需要提供完整的网址手段,包括与http://..。
WebDriver driver=new FirefoxDriver();
driver.get("http://www.google.com");
你能像这样试试吗。
谢谢你,Murali
https://stackoverflow.com/questions/34998798
复制