运行编写的程序,出现这个错误,不知道是为啥,求大神们解答疑惑与解决办法

xiangxiaoxixi 2016-07-12 11:40:49
WebDriver driver = new FirefoxDriver();
driver.get("http://photo.163.com/");

之前运行这个代码还是好好的,今天打开突然就这样报错了

七月 12, 2016 11:28:35 上午 org.openqa.selenium.os.ProcessUtils killWinProcess
警告: Process refused to die after 10 seconds, and couldn't taskkill it
java.lang.NullPointerException: Unable to find executable for: taskkill
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:251)
at org.openqa.selenium.os.UnixProcess.<init>(UnixProcess.java:62)
at org.openqa.selenium.os.CommandLine.<init>(CommandLine.java:38)
at org.openqa.selenium.os.WindowsUtils.killPID(WindowsUtils.java:178)
at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:138)
at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:247)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$2(UnixProcess.java:246)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:125)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:155)
at org.openqa.selenium.firefox.FirefoxBinary.quit(FirefoxBinary.java:246)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.quit(NewProfileExtensionConnection.java:194)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.quit(FirefoxDriver.java:364)
at org.openqa.selenium.firefox.FirefoxDriver.stopClient(FirefoxDriver.java:310)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:529)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:134)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at Download.main(Download.java:16)
...全文
338 1 打赏 收藏 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
如梦似梦 2017-07-07
  • 打赏
  • 举报
回复
我也碰到这个问题了,楼主怎么解决的

51,407

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧