While Automating JNLP Application, I am facing the below error

18 Views Asked by At

I'm facing an issue when trying to launch a JNLP (Java Network Launch Protocol) application using the Java Driver in my automation code. Here's a code snippet that I'm using:


import net.sourceforge.marathon.javadriver.JavaDriver;
import net.sourceforge.marathon.javadriver.JavaProfile; 

JavaProfile profile = new JavaProfile(JavaProfile.LaunchMode.JAVA_WEBSTART)

profile.setJNLPPath("C:\Users\spa6a5t\Music\frmservlet.jnlp");
profile.setJavaHome("C:\Program Files\Java\jdk-17");
Thread.sleep(10000);
profile.setStartWindowTitle("Oracle E-Business Suite R12");

JavaDriver driver = new JavaDriver(profile);

However, I'm getting the following exception:

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'WS631212', ip: '10.184.44.49'
Build info: version: '4.9.1', revision: 'eb2032df7f'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.7'
Driver info: net.sourceforge.marathon.javadriver.JavaDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: java, browserVersion: 1.0, platformName: any}]}]
Capabilities {browserName: java, browserVersion: 1.0, platformName: any}
It seems to be related to the java.lang.NoSuchMethodError with 'void org.openqa.selenium.os.Command

I've verified my JNLP file path, Java home, and window title. Could anyone provide guidance on how to resolve this issue and successfully launch the JNLP application using the Java Driver?

0

There are 0 best solutions below