Forum Discussion

atul_acrolinx's avatar
atul_acrolinx
Occasional Contributor
5 years ago
Solved

Object finder not able to find child objects on JavaFx panel in Oxygen XML Editor.

Hello team, My name is Atul Patil from Berlin Germany working with Acrolinx GmbH. We are current customers having Test complete and test execute licenses and currently evaluating renewal of the l...
  • TanyaYatskovska's avatar
    TanyaYatskovska
    5 years ago

    Hi atul_acrolinx,

     

    I've found your support case. Let me post a reply from the technical team here:


    Support team wrote:

    Are we talking about javafx.scene.web.WebView? This is an embedded browser control, and these require special support from the TestComplete side. This particular control is not supported at the moment. We have a feature request in our community for this support, but the demand does not seem to be high enough to expect it being implemented in the near future.

    There's no way to make TestComplete recognize controls as individual objects at the moment. But, there is a way to interact with them through the WebEngine object (see the documentation here: "Class WebEngine [https://docs.oracle.com/javase/8/javafx/api/javafx/scene/web/WebEngine.html]"). In a script, it'll look like this: 

    [JavaScript]
      var engine = JavaFXObject("WebView", "").getEngine();
      var doc = engine.getDocument();
      Log.Message(doc.getDocumentURI());


    To simulate actions over the web elements, you can use methods like getElementById, or call "executeScript" to use native methods of the browser to evaluate XPath expressions to find elements. There are also some relevant code examples on StackOverflow:
    https://stackoverflow.com/questions/26562380/getting-javafx-webengine-interpreted-document
    https://stackoverflow.com/questions/tagged/webview+javafx