title: Getting Exception :org.openqa.selenium.WebDriverException: unknown error: net::ERR_NAME_NOT_RESOLVED
body: <p>I am working on selenium-Cucumber-Gradle project I see that when I execute my UI Automation scripts with chrome browser it just open the browser and even I could the see the url is shown up in the browser address bar but within 2 seconds it exits with a exception as shown below. Any advise here would be greatly appreciated. I am using the latest chrome browser and chrome driver</p>
  <p><strong>Output Results
  =============</strong></p>
  <pre><code>    Given User navigates to the Rlbs website # RLbys_CardPage_Ui_Step_Test.navigates_to_the_RLby_s_website()
        org.openqa.selenium.WebDriverException: unknown error: net::ERR_NAME_NOT_RESOLVED
    (Session info: chrome=85.0.4183.83)
  Build info: version: '4.0.0-alpha-4', revision: 'c2d955b49e'
  
  Driver info: org.openqa.selenium.chrome.ChromeDriver
  Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 85.0.4183.83, chrome: {chromedriverVersion: 85.0.4183.87 (cd6713ebf92fa..., userDataDir: C:\Users\xxx~1\AppData\L...}, goog:chromeOption
  s: {debuggerAddress: localhost:61816}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileIntera
  ctability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}
  Session ID: e88071b72a89d636e000150881ccb44a
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:196)
          at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:129)
          at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53)
          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:582)
          at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:282)
          at com.pros.HALbrands.test.stepdefinition.HALCardPage_Ui_Step_Test.user_navigates_to_the_HALRLby_s_website(HALRLbyCardPage_Ui_Step_Test.java:40)
          at ?.User navigates to the HALRLby website(file:src/test/resources/featurefile/HALRLbyCardPage_Ui.feature:5)
  </code></pre>
  <p>May i know what might be issue for which is exception is thrown.</p>
  <h1>Please find the code snippet below:</h1>
  <h2>Feature File Code</h2>
  <p>Feature: Google Search Functionality</p>
  <p>Scenario: Validate google search functionality
  Given User navigates to the google website
  When  User enters text as Cards in search text field</p>
  <h2>Step Defenition</h2>
  <pre><code> public class Test1
   {
  
      @Given(&quot;User navigates to the google website&quot;)
      public void user_navigates_to_the_Google_s_website() {
   
          driver.get(&quot;https://www.google.com/&quot;);
          
      }
  
  }
  </code></pre>
  <p>------------------------------Invoking Browser Below --------------------------</p>
  <pre><code>public WebDriver standAloneStepUp(BrowserType bType) throws Exception {
          WebDriver driver;
          
          try {
              oLog.info(bType);
  
              switch (bType) {
  
              case CHROME:
                  //ChromeBrowser chrome = ChromeBrowser.class.newInstance();
                  //WebDriverManager.chromedriver().setup();
                  System. setProperty(&quot;webdriver.chrome.driver&quot;, System.getProperty(&quot;user.dir&quot;)+&quot;\\src\\main\\resources\\driver\\chromedriver.exe&quot;);
                  driver = new ChromeDriver();
                  return driver;
  
              case FIREFOX:
  //              FirefoxBrowser firefox = FirefoxBrowser.class.newInstance();
  //              WebDriverManager.firefoxdriver().setup();
                  System. setProperty(&quot;webdriver.gecko.driver&quot;, System.getProperty(&quot;user.dir&quot;)+&quot;\\src\\main\\resources\\driver\\geckodriver.exe&quot;);
                  driver = new FirefoxDriver();
                  //driver = new FirefoxDriver(firefox.getFirefoxOptions());
                  return driver;
  
  
           default:
                  throw new NoSutiableDriverFoundException(&quot; Driver Not Found : &quot; + ObjectRepo.reader.getBrowser());
              }
          } catch (Exception e) {
              oLog.equals(e);
              throw e;
          }
      }
  </code></pre>