EvryTime I am getting Error | Selenium Forum
M
Posted on 19/10/2015
Hi Ashish,

Each and every time i am getting below even I am writing a simple code .Please advise.
Code:-
package MoveToMouse;

import java.util.List;

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

public class American_golf {

public static void main(String[] args) {
// TODO Auto-generated method stub

WebDriver driver = new FirefoxDriver();
driver.get("http:\\bbc.com");

List<WebElement> allLinks= driver.findElements(By.tagName("a"));
System.out.println(allLinks.size());




}

}

Error:-


Exception in thread "main" org.openqa.selenium.WebDriverException: org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
System info: os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_20'
Driver info: driver.version: firefox
System info: os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_20'
Driver info: driver.version: firefox
at org.openqa.selenium.firefox.internal.ExtensionConnectionFactory.connectTo(ExtensionConnectionFactory.java:46)
at org.openqa.selenium.firefox.FirefoxDriver.connectTo(FirefoxDriver.java:139)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:129)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:109)
at MoveToMouse.American_golf.main(American_golf.java:15)
Caused by: org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
System info: os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_20'
Driver info: driver.version: firefox
at org.openqa.selenium.firefox.internal.SocketLock.lock(SocketLock.java:72)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.<init>(NewProfileExtensionConnection.java:45)
at org.openqa.selenium.firefox.internal.ExtensionConnectionFactory.connectTo(ExtensionConnectionFactory.java:44)
... 4 more

M
Replied on 19/10/2015

[quote:2hcdpvx1]Exception in thread "main" org.openqa.selenium.WebDriverException: org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms[/quote:2hcdpvx1]

change the version of firefox. this error comes when firefox is installed is wrong version. please install older firefox version.