diff --git a/pom.xml b/pom.xml
index ec9144e..9ff5865 100644
--- a/pom.xml
+++ b/pom.xml
@@ -207,8 +207,8 @@
maven-compiler-plugin
3.8.1
-
- 1.8
+
+ 11
@@ -260,7 +260,7 @@
org.robotframework
robotframework-maven-plugin
- 1.7.1
+ 2.1.0
acceptance tests
@@ -367,6 +367,39 @@
+
+ org.openjfx
+ javafx-graphics
+ 11
+ win
+
+
+ org.openjfx
+ javafx-graphics
+ 11
+ linux
+
+
+ org.openjfx
+ javafx-graphics
+ 11
+ mac
+
+
+ org.openjfx
+ javafx-controls
+ 11
+
+
+ org.openjfx
+ javafx-swing
+ 11
+
+
+ org.openjfx
+ javafx-fxml
+ 11
+
org.apache.maven
maven-model
@@ -391,7 +424,7 @@
org.testfx
openjfx-monocle
- 8u76-b04
+ jdk-12.0.1+2
org.robotframework
diff --git a/src/main/java/JavaFXLibrary.java b/src/main/java/JavaFXLibrary.java
index 2b54eb9..20f4b64 100644
--- a/src/main/java/JavaFXLibrary.java
+++ b/src/main/java/JavaFXLibrary.java
@@ -128,6 +128,8 @@ public JavaFXLibrary(boolean headless) {
if (headless) {
System.setProperty("testfx.robot", "glass");
System.setProperty("testfx.headless", "true");
+ System.setProperty("glass.platform", "Monocle");
+ System.setProperty("monocle.platform", "Headless");
System.setProperty("prism.order", "sw");
System.setProperty("prism.text", "t2k");
TestFxAdapter.isHeadless = true;
diff --git a/src/main/java/javafxlibrary/keywords/AdditionalKeywords/ApplicationLauncher.java b/src/main/java/javafxlibrary/keywords/AdditionalKeywords/ApplicationLauncher.java
index 57cc01f..3bf711e 100644
--- a/src/main/java/javafxlibrary/keywords/AdditionalKeywords/ApplicationLauncher.java
+++ b/src/main/java/javafxlibrary/keywords/AdditionalKeywords/ApplicationLauncher.java
@@ -112,14 +112,12 @@ private Class getMainClass(String appName) {
}
private void addPathToClassPath(String path) {
- URLClassLoader classLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
RobotLog.info("Setting following path to classpath: " + path);
try {
- Method method = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);
- method.setAccessible(true);
- method.invoke(classLoader, (new File(path)).toURI().toURL());
+ URL[] urls = new URL[]{new File(path).toURI().toURL()};
+ URLClassLoader classLoader = new URLClassLoader(urls, ClassLoader.getSystemClassLoader());
} catch (Exception e) {
throw new JavaFXLibraryFatalException("Problem setting the classpath: " + path, e);
@@ -176,11 +174,11 @@ public void setToClasspath(String path, boolean failIfNotFound) {
@RobotKeyword("Logs current classpath content")
public void logApplicationClasspath() {
try {
- ClassLoader cl = ClassLoader.getSystemClassLoader();
- URL[] urls = ((URLClassLoader) cl).getURLs();
RobotLog.info("Printing out classpaths: \n");
- for (URL url : urls) {
- RobotLog.info(url.getFile());
+
+ String classpathStr = System.getProperty("java.class.path");
+ for (String classpathItem : classpathStr.split(System.getProperty("path.separator"))) {
+ RobotLog.info(classpathItem);
}
} catch (Exception e) {
throw new JavaFXLibraryNonFatalException("Unable to log application classpaths", e);
diff --git a/src/main/java/javafxlibrary/keywords/AdditionalKeywords/ConvenienceKeywords.java b/src/main/java/javafxlibrary/keywords/AdditionalKeywords/ConvenienceKeywords.java
index 531cc7d..306d217 100644
--- a/src/main/java/javafxlibrary/keywords/AdditionalKeywords/ConvenienceKeywords.java
+++ b/src/main/java/javafxlibrary/keywords/AdditionalKeywords/ConvenienceKeywords.java
@@ -17,8 +17,8 @@
package javafxlibrary.keywords.AdditionalKeywords;
-import com.sun.javafx.scene.control.skin.TableViewSkin;
-import com.sun.javafx.scene.control.skin.VirtualFlow;
+import javafx.scene.control.skin.TableViewSkin;
+import javafx.scene.control.skin.VirtualFlow;
import javafx.collections.ObservableList;
import javafx.css.PseudoClass;
import javafx.geometry.BoundingBox;
@@ -279,7 +279,7 @@ public String getNodeText(Object locator) {
@RobotKeyword("Returns image name and path of the node. \n\n"
+ "``locator`` is either a _query_ or _Object_ for a node whose getHeight method will be called, see "
+ "`3. Locating JavaFX Nodes`. \n\n"
- + "Returns full image path by subsequently calling impl_getUrl -method. \n\n"
+ + "Returns full image path by subsequently calling getUrl -method. \n\n"
+ "Note, impl_getUrl -method is deprecated! Support for this method will be removed from Java in the future.")
@ArgumentNames({"node"})
public String getNodeImageUrl(Object locator) {
@@ -294,8 +294,7 @@ public String getNodeImageUrl(Object locator) {
try {
Object result = m.invoke(node, (Object) null);
Image image = (Image) result;
- RobotLog.trace("Calling deprecated method impl_getUrl() for image: \"" + image + "\"");
- return image.impl_getUrl();
+ return image.getUrl();
} catch (Exception e) {
throw new JavaFXLibraryNonFatalException("Problem calling method: .getImage(): " + e.getMessage(), e);
}
@@ -480,13 +479,17 @@ public List