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 licenses.

our company owns a product of content optimization and which has integration with almost all the editors in the market.

out of which we are trying to automate cases for Oxygen editor using test complete.
But our product's sidebar panel is based on the JavaFX web browser, and Testcomplete's object finder is not able to traverse through different child objects of the panel.

we need to understnad why this is happening ? where as when panel is based on the IE browser (for MS Word editor), it works fine.

But Oxygen editor using JavaFX browser to load our product and now we are not able to traveser through the child objects of our sidebar.

can you please extend you support on this problem ?

I am using
Oxygen editor 21.1 version
Test complete Version: 14.0.308.7 x64

  • 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


     

     

     

7 Replies