Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java selenium/webdriver:firefox/chrome浏览器打开但超时_Java_Google Chrome_Selenium_Firefox - Fatal编程技术网

Java selenium/webdriver:firefox/chrome浏览器打开但超时

Java selenium/webdriver:firefox/chrome浏览器打开但超时,java,google-chrome,selenium,firefox,Java,Google Chrome,Selenium,Firefox,问题: Chrome/Firefox浏览器打开,但不导航并超时 默认JRE库之外的依赖项和环境: 蚀 SeleniumJava3.2 浏览器: chrome-版本56.0.2924.87 64位 firefox-51.0.1 32位 Firefox代码: 看起来很直截了当,对吧?但浏览器无法通过打开,也无法导航到gmail 堆栈跟踪: at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommand

问题:

Chrome/Firefox浏览器打开,但不导航并超时

默认JRE库之外的依赖项和环境:

SeleniumJava3.2

浏览器:

chrome-版本56.0.2924.87 64位

firefox-51.0.1 32位

Firefox代码:

看起来很直截了当,对吧?但浏览器无法通过打开,也无法导航到gmail

堆栈跟踪:

at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:293)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:272)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:267)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:263)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:122)
    at driverTest.driverTest.main(driverTest.java:13)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:20034 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:142)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:88)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:108)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    ... 9 more
Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
这会打开浏览器,但不会再次转到gmail,并会因另一个超时错误而超时

at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:180)
        at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:168)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
        at cucumber.feature.webStepDefinitions.navigateToWebsite(webStepDefinitions.java:23)
        at ?.Given I navigated to the QA OnBoard site(C:/Users/tscanlon/workspace/webReleaseAutomation/src/cucumber/feature/netfeature.feature:5)
      Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:18101/status] to be available after 20011 ms
        at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:107)
        at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:177)
        at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:168)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
        at cucumber.feature.webStepDefinitions.navigateToWebsite(webStepDefinitions.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at cucumber.runtime.Utils$1.call(Utils.java:37)
        at cucumber.runtime.Timeout.timeout(Timeout.java:13)
        at cucumber.runtime.Utils.invoke(Utils.java:31)
        at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38)
        at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
        at cucumber.runtime.Runtime.runStep(Runtime.java:299)
        at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
        at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
        at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
        at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)
        at cucumber.runtime.Runtime.run(Runtime.java:121)
        at cucumber.api.cli.Main.run(Main.java:36)
        at cucumber.api.cli.Main.main(Main.java:18)
      Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
        at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:140)
        at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:80)
        ... 28 more
      Caused by: java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:128)
        ... 29 more

    When I login                                  # webStepDefinitions.userLogin()
    Then Create a meeting                         # webStepDefinitions.meetingCreation()

Failed scenarios:


org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.1.0', revision: '86a5d70', time: '2017-02-16 07:57:44 -0800'

Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:180)
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:168)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
    at cucumber.feature.webStepDefinitions.navigateToWebsite(webStepDefinitions.java:23)
    at ?.Given I navigated to the QA OnBoard site(C:/Users/tscanlon/workspace/webReleaseAutomation/src/cucumber/feature/netfeature.feature:5)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:18101/status] to be available after 20011 ms
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:107)
    at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:177)
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:168)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
    at cucumber.feature.webStepDefinitions.navigateToWebsite(webStepDefinitions.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at cucumber.runtime.Utils$1.call(Utils.java:37)
    at cucumber.runtime.Timeout.timeout(Timeout.java:13)
    at cucumber.runtime.Utils.invoke(Utils.java:31)
    at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38)
    at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
    at cucumber.runtime.Runtime.runStep(Runtime.java:299)
    at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
    at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
    at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
    at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)
    at cucumber.runtime.Runtime.run(Runtime.java:121)
    at cucumber.api.cli.Main.run(Main.java:36)
    at cucumber.api.cli.Main.main(Main.java:18)
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:140)
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:80)
    ... 28 more
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:128)

我认为两者都与某种防火墙/代理问题有关。有什么建议吗?我尝试了几种解决方案,每次都出现相同的错误。

**您需要在url中添加协议http或https,例如

如果不工作,则提供geckodriver.exe或chromedriver.exe路径,而不是firefox或chrome exe路径

下载geckodriver或chromedriver.exe

并将属性设置为:

System.setProperty("webdriver.gecko.driver", "drive path\\geckodriver.exe");
WebDriver netDriver = new FirefoxDriver();
netDriver.get("https://www.gmail.com");

我在firefox上也遇到了同样的问题,但在安装geckodriver之后,问题变得更好了,请安装geckodriver并再试一次

您尝试过其他域吗?可能你可以使用IP地址来确保它不是与DNS请求相关的问题。我之前在调试过程中使用了chromedriver,但这似乎不起作用,现在它可以完美地工作……有没有任何原因可以解释为什么原始chrome.exe始终失败?
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:180)
        at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:168)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
        at cucumber.feature.webStepDefinitions.navigateToWebsite(webStepDefinitions.java:23)
        at ?.Given I navigated to the QA OnBoard site(C:/Users/tscanlon/workspace/webReleaseAutomation/src/cucumber/feature/netfeature.feature:5)
      Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:18101/status] to be available after 20011 ms
        at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:107)
        at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:177)
        at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:168)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
        at cucumber.feature.webStepDefinitions.navigateToWebsite(webStepDefinitions.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at cucumber.runtime.Utils$1.call(Utils.java:37)
        at cucumber.runtime.Timeout.timeout(Timeout.java:13)
        at cucumber.runtime.Utils.invoke(Utils.java:31)
        at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38)
        at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
        at cucumber.runtime.Runtime.runStep(Runtime.java:299)
        at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
        at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
        at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
        at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)
        at cucumber.runtime.Runtime.run(Runtime.java:121)
        at cucumber.api.cli.Main.run(Main.java:36)
        at cucumber.api.cli.Main.main(Main.java:18)
      Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
        at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:140)
        at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:80)
        ... 28 more
      Caused by: java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:128)
        ... 29 more

    When I login                                  # webStepDefinitions.userLogin()
    Then Create a meeting                         # webStepDefinitions.meetingCreation()

Failed scenarios:


org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.1.0', revision: '86a5d70', time: '2017-02-16 07:57:44 -0800'

Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:180)
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:168)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
    at cucumber.feature.webStepDefinitions.navigateToWebsite(webStepDefinitions.java:23)
    at ?.Given I navigated to the QA OnBoard site(C:/Users/tscanlon/workspace/webReleaseAutomation/src/cucumber/feature/netfeature.feature:5)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:18101/status] to be available after 20011 ms
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:107)
    at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:177)
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:168)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
    at cucumber.feature.webStepDefinitions.navigateToWebsite(webStepDefinitions.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at cucumber.runtime.Utils$1.call(Utils.java:37)
    at cucumber.runtime.Timeout.timeout(Timeout.java:13)
    at cucumber.runtime.Utils.invoke(Utils.java:31)
    at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38)
    at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
    at cucumber.runtime.Runtime.runStep(Runtime.java:299)
    at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
    at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
    at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
    at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)
    at cucumber.runtime.Runtime.run(Runtime.java:121)
    at cucumber.api.cli.Main.run(Main.java:36)
    at cucumber.api.cli.Main.main(Main.java:18)
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:140)
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:80)
    ... 28 more
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:128)
System.setProperty("webdriver.gecko.driver", "drive path\\geckodriver.exe");
WebDriver netDriver = new FirefoxDriver();
netDriver.get("https://www.gmail.com");