首先给大家分享一个巨牛巨牛的人工智能教程,是我无意中发现的。教程不仅零基础,通俗易懂,而且非常风趣幽默,还时不时有内涵段子,像看小说一样,哈哈~我正在学习中,觉得太牛了,所以分享给大家!点这里可以跳转到教程
错误信息1:
FAILED CONFIGURATION: @BeforeClass setUp
java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Unable to delete file C:\Users\ADMINI~1\AppData\Local\Temp\customProfileDir9cf2c422885b4bb683e8f836a80a58be\parent.lock
原因:ff3.6与selenium1.0.1不兼容,服务器端使用selenium1.0.2以上的版本即可
错误信息2:
java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox.exe'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3c:\blah\firefox.exe
java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: org.openqa.selenium.server.browserlaunchers.InvalidBrowserExecutableException: The specified path to the browser executable is invalid.
原因:找不到FF,不能打开浏览器
解决:1、把ff重新安装一次,安装路径默认,不要修改
2、在脚本中增加详细的浏览器绝对路径地址:
selenium = new DefaultSelenium("localhost", 4444, "*firefox D:\Program Files\Mozilla Firefox\firefox.exe","http://istock.jrj.com.cn/");