Dear Team,
we are also interested in support for JavaFX WebView control.
We are trying to automate testing of an JavaFX Webview Control. Within the WebView we are showing an Webpage which contains an generated Report.
Actually we are not able to get any objects within the Java FX Webview Panel.
The actual JavaCode for launching the emmbeded WebView from our Java Developer is as following:
import javafx.application.Platform;
import javafx.collections.ObservableList;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import com.sun.javafx.application.PlatformImpl;
PlatformImpl.startup(new Runnable() {
@Override
public void run() {
stage = new Stage();
stage.setResizable(true);
Group root = new Group();
Scene scene = new Scene(root, 962, 630);
stage.setScene(scene);
browser = new WebView();
browser.setMaxSize(962, 630);
browser.setMinSize(962, 630);
webEngine = browser.getEngine();
webEngine.load(uri.toString());
ObservableList<Node> children = root.getChildren();
children.add(browser);
jfxPanel.setScene(scene);
jfxPanel.setSize(962, 630);
}
});
Regards,
Dirk