After using the Firefox plugin recording script into Java, run the error
Java.lang.RuntimeException:Could not start Selenium session:failed to start new browser session:java.lang.RuntimeExcept Ion:java.lang.RuntimeException:Firefox could not being found in the path! Please add the directory containing ' Firefox.exe ' to your PATH environment
variable, or explicitly specify a path to Firefox like this:
*firefox C:\blah\firefox.exe
At Com.thoughtworks.selenium.DefaultSelenium.start (defaultselenium.java:109)
At Utiled.setup (utiled.java:21)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method)
Solution:
1, according to the error prompts to add Firefox.exe to the environment variables, the results indicate no
2, in line of code results show written
Selenium = new Defaultselenium ("localhost", 4444, *firefox C:\\Program Files (x86) \\Mozilla Firefox\\firefox.exe "," https://www.baidu.com/");