用firefox 插件录制脚本转成java后,运行报错
java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: java.lang.RuntimeException: java.lang.RuntimeException: Firefox could not be found in the path!
Please add the directory containing ''firefox.exe'' to your PATH environment解决办法 :
1、按照报错提示添加firefox.exe到环境 变量,结果表明不行
2、在代码行里结果显示写入
selenium = new DefaultSelenium("localhost", 4444, "*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "https://www.baidu.com/");