初学者,哪位大神给瞅瞅,郁闷。。
Exception in thread “main” org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
System info: os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_31’
firefox46.0.1版本
代码如下:
package com.test;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
public class UserTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver;
System.setProperty(“webdriver.firefox.bin”, “C:/Program Files (x86)/Mozilla Firefox/firefox.exe”);
WebDriver driver = new FirefoxDriver();
driver.get(“https://www.baidu.com”);
}
}