Page 1 of 1

FXCanvas and elements inside not recognised

Posted: Wed Aug 26, 2015 1:16 pm
by lili
Hello world,

I have a desktop application that uses JavaFX and SWT.
When tracking some UI elements, I noticed that the FXCanvas component is always recognised as a picture and I cannot track the UI elements inside of the FXCanvas at all.
So if I have a button inside my FXCanvas, I cannot track it or use it in a recording since it will not be recognised again when playing the recorded test.

Any tipps? :P

Re: FXCanvas and elements inside not recognised

Posted: Wed Aug 26, 2015 2:17 pm
by odklizec
Hi and welcome here.

The problem of the canvas is that it's basically a 2D picture and so there is no way to track/identify elements inside it. Google says that fxCanvas is an implementation of HTML5 canvas. So I would suggest you to check this discussion (not solution, just some more comments)...
http://www.ranorex.com/forum/html5-how- ... t8341.html

BTW, I remember a discussion with one of my former colleagues about the possibility to extend Java canvas with implementation of accessibility to individual canvas elements. So then Ranorex would be able to identify the individual canvas elements. But I left the company and I'm not quite sure someone ever tried to implement this idea? So there may be a possibility to somehow extend the canvas with accessibility, but I'm not sure how much work it would be.

Re: FXCanvas and elements inside not recognised

Posted: Thu Aug 27, 2015 1:26 pm
by lili
Hi,

thanks for your helpful reply!

Actually I was just thinking about a little work-around - do you think it would be possible to access the FXCanvas object itself and call some of its methods in Ranorex? Because that way I would gain access to the scene graph of the embedded JavaFX controls, right?

Re: FXCanvas and elements inside not recognised

Posted: Thu Aug 27, 2015 1:42 pm
by odklizec
Hi,

I'm afraid, I don't have a clue about this. What you can do is to use ExecuteScript method to call javascript code from Ranorex. But I have no clue if this would help you in any way? The best would be to discuss it with experienced C# and Java developer ;)