我已经搜索了解决方案,但没有找到解决方案,但我总是遇到此错误
codigo:
public static void main(String [] args) { System.setProperty("webdriver.chrome.driver","C:\\Users\\Ofima\\workspace\\OfimaWeb\\chromedriver.exe"); WebDriver driver= new ChromeDriver(); driver.get("http://ofimawebbeta.ofima.com/"); driver.manage().window().maximize(); driver.getTitle(); }
错误:
Starting ChromeDriver (v2.9.248315) on port 41785 ene 19, 2018 9:48:49 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFORMACIÓN: Detected dialect: OSS Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.SocketException: Connection reset Build info: version: '3.8.0', revision: '924c4067df', time: '2017-11-30T11:37:19.049Z' System info: host: 'PCPOF-021', ip: '10.72.4.128', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:325) at OfimaWeb.cartera.main(cartera.java:23) Caused by: java.net.SocketException: Connection reset
从下载ChromeDriver
http://chromedriver.storage.googleapis.com/index.html?path=2.33/
此ChromeDriver可以与您的Google Chrome版本一起使用。