FXCanvas and elements inside not recognised

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
lili
Posts: 2
Joined: Wed Aug 26, 2015 1:10 pm

FXCanvas and elements inside not recognised

Post by lili » Wed Aug 26, 2015 1:16 pm

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

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: FXCanvas and elements inside not recognised

Post by odklizec » Wed Aug 26, 2015 2:17 pm

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

lili
Posts: 2
Joined: Wed Aug 26, 2015 1:10 pm

Re: FXCanvas and elements inside not recognised

Post by lili » Thu Aug 27, 2015 1:26 pm

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?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: FXCanvas and elements inside not recognised

Post by odklizec » Thu Aug 27, 2015 1:42 pm

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 ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration