1

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)
sufiya
  • 43
  • 2
  • 8

1 Answers1

0

i had the same issue i.e was unable to load baseurl in the browser... you need to replace

System.setProperty("webdriver.gecko.driver","C:\Marionette\geckodriver_1.exe" ); instead of System.setProperty("webdriver.firefox.marionette","C:/Users/admin/Downloads/geckodriver-v0.11.1-win32/geckodriver.exe");

or try reverse

zzz
  • 497
  • 3
  • 14
  • 32