SWT Canvas

Class library usage, coding and language questions.
crh1cob
Posts: 1
Joined: Thu Aug 30, 2012 12:32 pm

SWT Canvas

Post by crh1cob » Wed Sep 05, 2012 1:11 pm

Hello ,

I am not able to identify the elements which are placed in SWT Canvas from Ranorex Spy..

Could anybody help me plz......

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: SWT Canvas

Post by Support Team » Wed Sep 05, 2012 2:02 pm

Hello,

SWT is unfortunately not yet fully supported by Ranorex.
You could try to create your test with the image based functionality of Ranorex for the specific SWT components.
Here is a link about how it works: Image-Based Automation.

Regards,
Markus
Ranorex Support Team
.
Image

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

Re: SWT Canvas

Post by odklizec » Fri Jun 21, 2013 9:39 am

Hi,

We are experiencing a very similar (if not the same) problem. We are not able to identify the elements placed in AWT canvas. Does the SWT canvas limitation apply to AWT canvas too?
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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: SWT Canvas

Post by Support Team » Mon Jun 24, 2013 4:05 pm

Hello,

Ranorex currently supports Java AWT and Swing, so in general you should be able to track the elements after you successfully instrumented Java on your machine Java AWT/Swing.
In order to analyze the issue in detail could you please send or post a Ranorex snapshot file of your AUT?
It would be also great if you could provide some additional information about your application under test :).

Regards,
Markus
.
Image

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

Re: SWT Canvas

Post by odklizec » Mon Jun 24, 2013 5:35 pm

Hi Markus,

Thanks for the reply! I will ask developers to provide me with the actual dev. version to create you the snapshot. But I think it will not help much. All you will see is canvas with no trace of children ;)

The instrumentation seems to be OK. True, there is displayed a warning about the instrumentation, but I think it's just a "false" alarm caused by the fact that our application is not quite standard AWT app ;) I'm used to see this warning since I started using Ranorex with this app. The problem is that it uses some kind of SWT/AWT bridge, where the Canvas is AWT object. But apart of the actual canvas problem, everything else seems work OK.

The thing about the Canvas issue is, that Ranorex simply don't go to the get-children methods (which it normally does while tracking/evaluating other elements). We found that while debugging our app during an attempt to track the canvas elements with RX spy. It seems as if Ranorex finds that the tracked element is AWT Canvas, it simply gave up on looking for children?
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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: SWT Canvas

Post by Support Team » Wed Jun 26, 2013 1:39 pm

Hello,

Unfortunately, we don’t fully support AWT accessibility.

Do you have a native SWT application without using AWT?
If that is the case, you could try to disable Java-Instrumentation.
You could achieve this by removing the following line in your Java installation directory (e.g. ‘C:\Program Files\Java\jre6\lib’):

Code: Select all

‘assistive_technologies=com.ranorex.RanorexAutomation’
Then, you should be able to recognize your elements.

Please let me know if this would be a possible solution for you.
Thank you in advance.

Regards,
Markus (T)
.
Image