JavaFXLibrary icon indicating copy to clipboard operation
JavaFXLibrary copied to clipboard

Launch JavaFX Application Causes Exception

Open danPec13 opened this issue 4 years ago • 1 comments

After starting the java 11 remote server at port 8270 java --module-path /opt/javafx-sdk-11.0.2/lib --add-modules javafx.controls,javafx.fxml,javafx.base,javafx.graphics,javafx.media,javafx.swing,javafx.web -Djdk.gtk.version=2 -jar /opt/robot_javafx_jars/javafxlibrary-0.6.0.jar

I attempt to run my robot file with my IP Address:

*** Settings ***
Library     Remote	 http://ip_address:8270	     WITH NAME	JavaFXLibrary

*** Test Cases ***
Test Text Field Text Should Be
	Launch JavaFX Application	org.ocui.login.LoginUI

and am getting the error FxRobot not initialized, launch test application with the library. My start and main method are in the LoginUI class and launches normally for java fx without any arguments. After tracing through the JavaFXLibrary code, I don't understand why there would be an exception thrown when creating the new session for launching the application. Just wondering if I am missing anything in the robot keyword.

Below is the log file:

KEYWORD: JavaFXLibrary . Launch Javafx Application org.ocui.login.LoginUI
Documentation: Launches JavaFX application with the given arguments.
Start / End / Elapsed: 	20200918 14:22:03.775 / 20200918 14:22:09.333 / 00:00:05.558
14:22:09.332 	INFO 	Starting application:org.ocui.login.LoginUI 	
14:22:09.332 	INFO 	JavaFXLibrary keyword has failed! 	
14:22:09.332 	ERROR 	FxRobot not initialized, launch test application with the library 	
14:22:09.333 	FAIL 	Unable to launch application: org.ocui.login.LoginUI

danPec13 avatar Sep 18 '20 18:09 danPec13

Java 11 is not yet supported, we have #23 on the works.

sampeson avatar Sep 21 '20 06:09 sampeson