While executing my script, script is able to open browser but it is not able to put url I used driver.get() method. Then I tried adding and increasing sleep time, after that my script is able to load url and it is working as expected but most of the time it is failing I don't know it is time problem or driver problem please suggest me proper solution.
Platform used - Windows 7 language -java tool - selenium web driver 2.48.2 Firefox -34.0
code used for driver instance creation is as below :
try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        driver = new FirefoxDriver();
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        driver.get(myurl);
        }
error logs are as follows:
Slenium web driver : Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output...and ...Receiving org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH)
 
    