Skip to content
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

Unable to open chrome browser #335

Open
praveenraj123 opened this issue Dec 22, 2021 · 2 comments
Open

Unable to open chrome browser #335

praveenraj123 opened this issue Dec 22, 2021 · 2 comments
Labels

Comments

@praveenraj123
Copy link

Describe the Issue
After we update fremeworkium 4 X version, we unable launching the chrome browser

To Reproduce
Steps to reproduce the behavior:

  1. we set custom chrome caps with extend ChromeImpl class
  2. add vm argument
  3. java.lang.NoClassDefFoundError: org/openqa/selenium/internal/Require

Expected Behaviour
launching the browser and navigate application URL

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Frameworkium-core version: [4.1.0.2]
  • OS: [ Windows 10]
  • Browser [Chrome]
  • Version [96.0.4664.110 (Official Build) (64-bit)]

Additional Context
Please provide any solution for this issue
Error trace

22:36:09.943 [main] ERROR - null
java.lang.NullPointerException: null
at com.frameworkium.core.ui.driver.lifecycle.SingleUseDriverLifecycle.getWebDriver(SingleUseDriverLifecycle.java:34) ~[frameworkium-core-4.1.0.2.jar:?]
at com.frameworkium.core.ui.UITestLifecycle.getWebDriver(UITestLifecycle.java:149) ~[frameworkium-core-4.1.0.2.jar:?]
at com.frameworkium.core.ui.listeners.ScreenshotListener.takeScreenshotAndSaveLocally(ScreenshotListener.java:45) ~[frameworkium-core-4.1.0.2.jar:?]
at com.frameworkium.core.ui.listeners.ScreenshotListener.onTestSkipped(ScreenshotListener.java:39) ~[frameworkium-core-4.1.0.2.jar:?]
at org.testng.internal.TestListenerHelper.runTestListeners(TestListenerHelper.java:87) ~[testng-7.3.0.jar:?]
at org.testng.internal.TestInvoker.runTestResultListener(TestInvoker.java:220) ~[testng-7.3.0.jar:?]
at org.testng.internal.TestInvoker.invokeListenersForSkippedTestResult(TestInvoker.java:447) ~[testng-7.3.0.jar:?]
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:547) ~[testng-7.3.0.jar:?]
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174) ~[testng-7.3.0.jar:?]
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46) ~[testng-7.3.0.jar:?]
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822) ~[testng-7.3.0.jar:?]
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147) ~[testng-7.3.0.jar:?]
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) ~[testng-7.3.0.jar:?]
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) ~[testng-7.3.0.jar:?]
at java.util.ArrayList.forEach(ArrayList.java:1507) [?:?]
at org.testng.TestRunner.privateRun(TestRunner.java:764) [testng-7.3.0.jar:?]
at org.testng.TestRunner.run(TestRunner.java:585) [testng-7.3.0.jar:?]
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384) [testng-7.3.0.jar:?]
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378) [testng-7.3.0.jar:?]
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337) [testng-7.3.0.jar:?]
at org.testng.SuiteRunner.run(SuiteRunner.java:286) [testng-7.3.0.jar:?]
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) [testng-7.3.0.jar:?]
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) [testng-7.3.0.jar:?]
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218) [testng-7.3.0.jar:?]
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) [testng-7.3.0.jar:?]
at org.testng.TestNG.runSuites(TestNG.java:1069) [testng-7.3.0.jar:?]
at org.testng.TestNG.run(TestNG.java:1037) [testng-7.3.0.jar:?]
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115) [testng-remote.jar:?]
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) [testng-remote.jar:?]
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) [testng-remote.jar:?]
FAILED CONFIGURATION: @BeforeMethod configureBrowserBeforeTest(public void CTSmoke.ClaimFolder.tc01ManageMyReminders())
java.lang.NoClassDefFoundError: org/openqa/selenium/internal/Require
at org.openqa.selenium.chromium.ChromiumOptions.setExperimentalOption(ChromiumOptions.java:185)
at ChromeCapability.ChromeDeviceCapabilitiesForJenkins.getCapabilities(ChromeDeviceCapabilitiesForJenkins.java:28)
at ChromeCapability.ChromeDeviceCapabilitiesForJenkins.getCapabilities(ChromeDeviceCapabilitiesForJenkins.java:14)
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:567)
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:1507)
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 org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.internal.Require
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

@Mjl33
Copy link
Member

Mjl33 commented Jun 3, 2022

This seems to be an incompatibility between the webdriver you are using and Se4
Without any more details, I can't fix this.

Do note there are breaking changes between Se3 and Se4
That is something not within my scope to fix

I will close this ticket in a few days if there is no other information trail

@emerson-b
Copy link
Contributor

emerson-b commented Jul 5, 2022

Selenium 4 changed the way capabilities are set for a browser: see Upgrading to selenium 4

You probably need to switch from DesiredCapabilities.chrome(); to the new Map<String, Object> cloudOptions = new HashMap<>();

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

3 participants