Skip to content

Timeouts on master causing NoSuchMethodError #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
emerson-b opened this issue Aug 31, 2021 · 1 comment
Open

Timeouts on master causing NoSuchMethodError #287

emerson-b opened this issue Aug 31, 2021 · 1 comment
Labels

Comments

@emerson-b
Copy link
Contributor

emerson-b commented Aug 31, 2021

When pulling latest master tagged as 4.0.0-BETA2-SNAPSHOT and trying to run TheInternetExampleTests (with a modified ru.yandex.qatools.htmlelements version due to selenium 4 update issues), the following error is shown :

java.lang.NoSuchMethodError: 'org.openqa.selenium.WebDriver$Timeouts org.openqa.selenium.WebDriver$Timeouts.setScriptTimeout(java.time.Duration)'

	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringTimeouts.setScriptTimeout(EventFiringWebDriver.java:708)
	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringTimeouts.setScriptTimeout(EventFiringWebDriver.java:703)
	at com.frameworkium.core.ui.driver.AbstractDriver.setupEventFiringWebDriver(AbstractDriver.java:69)
	at com.frameworkium.core.ui.driver.AbstractDriver.initialise(AbstractDriver.java:56)
	at com.frameworkium.core.ui.driver.DriverSetup.instantiateDriver(DriverSetup.java:34)
	at com.frameworkium.core.ui.driver.lifecycle.SingleUseDriverLifecycle.initBrowserBeforeTest(SingleUseDriverLifecycle.java:29)
	at com.frameworkium.core.ui.UITestLifecycle.beforeTestMethod(UITestLifecycle.java:81)
	at com.frameworkium.core.ui.UITestLifecycle.beforeTestMethod(UITestLifecycle.java:99)
	at com.frameworkium.core.ui.tests.BaseUITest.configureBrowserBeforeTest(BaseUITest.java:150)
	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:564)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61)
	at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366)
	at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320)
	at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:701)
	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:527)
	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.testng.TestRunner.privateRun(TestRunner.java:764)
	at org.testng.TestRunner.run(TestRunner.java:585)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
	at org.testng.TestNG.runSuites(TestNG.java:1069)
	at org.testng.TestNG.run(TestNG.java:1037)
	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)

This might be due to the deprecation of setScriptTimeout(long time, TimeUnit unit) in Selenium4, instead using setScriptTimeout(Duration duration).

Expected outcome:

  1. Start test suite
  2. Driver generated
  3. Test runs
@emerson-b emerson-b added the bug label Aug 31, 2021
@Mjl33
Copy link
Member

Mjl33 commented Apr 18, 2022

HtmlElements is no longer maintained by the original author.
We have decided to induct it into our internal library at com.frameworkium.core.htmlelements
This should be updated to be compatible with Selenium 4

Have a try and see if your issue is resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants