1

I am using Selenium 4.0.0-alpha-3, webdrivermanager 3.7.1 , Chrome Browser 79 , Chrome driver 4.0.0-alpha-3 , JAVA

code look like:

WebDriverManager.chromedriver().setup();
driver = new ChromeDriver(options);
driver.get("www.Url1.com");     
driver.switchTo().newWindow(WindowType.TAB);
// below code line is throwing error
driver.get("www.Url2.com");

downloaded Maven dependencies, this is what I downloaded -

<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
    <version>3.7.1</version>
</dependency>
<dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.6</version>
</dependency> 

Error Trace:

org.openqa.selenium.InvalidArgumentException: invalid argument (Session info: chrome=79.0.3945.79) Build info: version: '4.0.0-alpha-3', revision: '8c567de6dc' System info: host: 'IL-mike', ip: '10.16.240.29', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '12.0.1' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 79.0.3945.79, chrome: {chromedriverVersion: 79.0.3945.36 (3582db32b3389..., userDataDir: C:\Users\mike\AppData\Loc...}, goog:chromeOptions: {debuggerAddress: localhost:56216}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify} Session ID: e65fde07f0a168c2399049ab2ffe5866 at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:191) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:125) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:161) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:576) at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:276) at at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567)

1
  • thanks for your reply. I made a mistake here for URL. I was giving "www.google.com" and I was seeing issue. During troubleshoot I changed this URL to "h tt ps://www.google.com/" and worked for me perfectly. I thought since it's Alpha version so acting weird. thanks Commented Dec 11, 2019 at 22:42

1 Answer 1

2

Instead of running another driver.get() try running it with driver.execute_script("replace.window.location{"www.Url2.com"}")

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for your reply. I made a mistake here for URL. I was giving "www.google.com" and I was seeing issue. During troubleshoot I changed this URL to "ht t ps://www.google.com/" and worked for me perfectly. I thought since it's Alpha version so acting weird. thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.