Manideep Chanda
Manideep Chanda

Reputation: 11

not able to run the script in eclipse

Attempting to execute the following Selenium script results in a WebDriverException:

package package1;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class Class1 {

    public static void main(String[] args) {

        WebDriver driver= new FirefoxDriver();

        driver.manage().window().maximize();

        driver.close();

    }

}

The exception thrown is

org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:99)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:80)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at package1.Class1.main(Class1.java:12)

Why is this happening?

Used version- 1.8.0_101 java file Neon eclipse 2.53 selenium jar file

Upvotes: 1

Views: 600

Answers (1)

omer727
omer727

Reputation: 7565

You need to start the selenium server with the Firefox driver before running the test

Upvotes: 1

Related Questions