-2

Issue- Test FX application using Marathon driver - Unable to establish connection with the application. Steps-

  1. FX based Client Application Launch happens successfully using marathon profile set. 2.Exception while setting driver.
  2. Unable to set text in textfield.

Code shown in image

Output after launch-

FAILED: createJavaProfile java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(Ljava/util/Comparator;)Ljava/util/stream/Collector; at org.openqa.selenium.remote.NewSessionPayload.lambda$validate$3(NewSessionPayload.java:191) at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:441) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:442) at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) at org.openqa.selenium.remote.NewSessionPayload.validate(NewSessionPayload.java:207) at org.openqa.selenium.remote.NewSessionPayload.(NewSessionPayload.java:152) at org.openqa.selenium.remote.NewSessionPayload.create(NewSessionPayload.java:99) at org.openqa.selenium.remote.NewSessionPayload.create(NewSessionPayload.java:94) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:69) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138) at net.sourceforge.marathon.javadriver.JavaDriverCommandExecutor.execute(JavaDriverCommandExecutor.java:135) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:582) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:136) at net.sourceforge.marathon.javadriver.JavaDriver.(JavaDriver.java:156) at net.sourceforge.marathon.javadriver.JavaDriver.(JavaDriver.java:131) at net.sourceforge.marathon.javadriver.JavaDriver.(JavaDriver.java:112) at io.mosio.demograph.demo.Demo2stack.createJavaProfile(Demo2stack.java:60) 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:566) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108) at org.testng.internal.Invoker.invokeMethod(Invoker.java:661) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) at org.testng.TestRunner.privateRun(TestRunner.java:744) at org.testng.TestRunner.run(TestRunner.java:602) at org.testng.SuiteRunner.runTest(SuiteRunner.java:380) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340) at org.testng.SuiteRunner.run(SuiteRunner.java:289) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301) at org.testng.TestNG.runSuitesLocally(TestNG.java:1226) at org.testng.TestNG.runSuites(TestNG.java:1144) at org.testng.TestNG.run(TestNG.java:1115) 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)

Nee
  • 11
  • 3
  • JavaProfile profile1 = new JavaProfile(LaunchMode.JAVA_COMMAND_LINE); //LaunchMode.JAVA_COMMAND_LINE profile1.setLaunchType(LaunchType.FX_APPLICATION); profile1.setWorkingDirectory("D:\\RegClientAutomation\\reg-client"); profile1.setJavaCommand("D:\\RegClientAutomation\\reg-client\\jre\\jre\\bin\\java"); profile1.addClassPath("D:\\RegClientAutomation\\registration-client-1.1.3-jar-with-dependencies.jar"); profile1.setMainClass("io.mosip"); driver = new JavaDriver(profile1); WebElement userId =driver.findElement(By.id("userId"));userId.sendKeys(""); – Nee Jan 20 '21 at 12:27
  • Here is the code again.. – Nee Jan 20 '21 at 12:28

1 Answers1

0

Please check the google guava version. As marathon java driver 5.4.0.0 uses selenium 3.14.0 which is internally dependent on google.guava version 25.0-jre. That might be causing the issue.

Similar issue:

java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(Ljava/util/Comparator;)Ljava/util/stream/Collector;

Aditya Karra
  • 151
  • 1
  • 7