Chrome not reachable Selenium WebDriver error -
i facing issue, know question present , have tried solutions mentioned hence asking configurations , code
earlier scripts running aren't tried making basic open browser script. latest version of selenium webdriver : http://selenium-release.storage.googleapis.com/3.5/selenium-java-3.5.0.zip
latest version on chromedriver : http://chromedriver.storage.googleapis.com/index.html?path=2.31/
basic open browser code:
`package trial; import java.util.concurrent.timeunit; import org.openqa.selenium.webdriver; import org.openqa.selenium.chrome.chromedriver; public class trial_class { public static void main(string args[]){ system.setproperty("webdriver.chrome.driver", "chromedriver.exe"); webdriver driver = new chromedriver(); driver.manage().timeouts().implicitlywait(10, timeunit.seconds); driver.get("http://www.youtube.com"); driver.manage().timeouts().implicitlywait(10, timeunit.seconds); } } `
but still getting below error :
starting chromedriver 2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8) on port 43967 local connections allowed. exception in thread "main" org.openqa.selenium.webdriverexception: chrome not reachable (driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=windows nt 6.3.9600 x86_64) (warning: server did not provide stacktrace information) command duration or timeout: 61.81 seconds build info: version: 'unknown', revision: 'unknown', time: 'unknown' system info: host: 'swati', ip: '192.168.0.5', os.name: 'windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_121' driver info: driver.version: chromedriver @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(unknown source) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(unknown source) @ java.lang.reflect.constructor.newinstance(unknown source) @ org.openqa.selenium.remote.errorhandler.createthrowable(errorhandler.java:215) @ org.openqa.selenium.remote.errorhandler.throwifresponsefailed(errorhandler.java:167) @ org.openqa.selenium.remote.jsonwireprotocolresponse.lambda$new$0(jsonwireprotocolresponse.java:53) @ org.openqa.selenium.remote.jsonwireprotocolresponse.lambda$getresponsefunction$2(jsonwireprotocolresponse.java:91) @ org.openqa.selenium.remote.protocolhandshake.lambda$createsession$24(protocolhandshake.java:360) @ java.util.stream.referencepipeline$3$1.accept(unknown source) @ java.util.spliterators$arrayspliterator.tryadvance(unknown source) @ java.util.stream.referencepipeline.foreachwithcancel(unknown source) @ java.util.stream.abstractpipeline.copyintowithcancel(unknown source) @ java.util.stream.abstractpipeline.copyinto(unknown source) @ java.util.stream.abstractpipeline.wrapandcopyinto(unknown source) @ java.util.stream.findops$findop.evaluatesequential(unknown source) @ java.util.stream.abstractpipeline.evaluate(unknown source) @ java.util.stream.referencepipeline.findfirst(unknown source) @ org.openqa.selenium.remote.protocolhandshake.createsession(protocolhandshake.java:363) @ org.openqa.selenium.remote.protocolhandshake.createsession(protocolhandshake.java:137) @ org.openqa.selenium.remote.httpcommandexecutor.execute(httpcommandexecutor.java:142) @ org.openqa.selenium.remote.service.drivercommandexecutor.execute(drivercommandexecutor.java:82) @ org.openqa.selenium.remote.remotewebdriver.execute(remotewebdriver.java:641) @ org.openqa.selenium.remote.remotewebdriver.startsession(remotewebdriver.java:254) @ org.openqa.selenium.remote.remotewebdriver.startsession(remotewebdriver.java:236) @ org.openqa.selenium.remote.remotewebdriver.<init>(remotewebdriver.java:137) @ org.openqa.selenium.chrome.chromedriver.<init>(chromedriver.java:178) @ org.openqa.selenium.chrome.chromedriver.<init>(chromedriver.java:167) @ org.openqa.selenium.chrome.chromedriver.<init>(chromedriver.java:124) @ trial.trial_class.main(trial_class.java:11)
thanks in advance.
you have set
setproperty(string key, string path)
here "key
" "webdriver.chrome.driver
" , "path
" "path driver stored". use single forward slash "/
" in path.
system.setproperty("webdriver.chrome.driver", "e:/chromedriver.exe"); webdriver driver = new chromedriver(); driver.manage().timeouts().implicitlywait(10, timeunit.seconds); driver.get("http://www.youtube.com"); driver.manage().timeouts().implicitlywait(10, timeunit.seconds);
above code work in selenium jar 3.5.0. hope works fine in system too.
Comments
Post a Comment