0

I am new in QA and i tried to automate for the first time in Microsoft Edge Version 109.0.1518.61 and getting these errors: These are the error i am getting first2nd error

  • SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
  • SLF4J: Defaulting to no-operation (NOP) logger implementation
  • SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
  • Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: net::ERR_CONNECTION_CLOSED

I am using this as a maven project. There is no error in the code blocks.My whole code block is given below:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.edge.EdgeOptions;

public class BrowserTest {

    public static void main(String[] args) {
        
        
        
        EdgeOptions options = new EdgeOptions();
        options.addArguments("edge.switches","--disable-extensions");
        WebDriver Driver = new EdgeDriver(options);
        
        Driver.get("https://seleniumhq.org/");
    }

}

1 Answer 1

1

The error is in your below line:

Driver.get("https://seleniumhq.org/");

This happens when the URL you are trying to hit is not reachable, URL is blocked by a proxy etc. If you are not specific about using this URL, then try the below code:

Driver.get("https://www.selenium.dev/");

On another note, as a best practice follow java standard naming conventions. For example variable name Driver should be driver

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

1 Comment

org vs dev great observation +1

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.