Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98814

java.lang.RuntimeException: Could not start Selenium session:

$
0
0

In MacBook Pro, when I run the following Selenium, I am getting RuntimeException.

import com.thoughtworks.selenium.DefaultSelenium;

public class Test {

   public static void main(String[] args) {
           DefaultSelenium selenium=new DefaultSelenium("localhost", 4444,"*firefox ","http://");
           selenium.start();
           selenium.open("http://google.co.in");
           selenium.windowMaximize();
           selenium.type("gbqfq", "selenium");
           selenium.click("gbqfb");
   }

}

Exception:

Exception in thread "main" java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: java.lang.RuntimeException: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox-bin' or 'firefox'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3 /blah/blah/firefox-bin
       at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:109)
       at Test.main(Test.java:8)
Caused by: com.thoughtworks.selenium.SeleniumException: Failed to start new browser session: java.lang.RuntimeException: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox-bin' or 'firefox'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3 /blah/blah/firefox-bin
       at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)
       at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106)
       at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:275)
       at com.thoughtworks.selenium.HttpCommandProcessor.start(HttpCommandProcessor.java:237)
       at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:100)
       ... 1 more

Please help me.. how to solve.


Viewing all articles
Browse latest Browse all 98814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>