Could not access cells in a wxWindow

Class library usage, coding and language questions.
Liam
Posts: 16
Joined: Wed Mar 31, 2010 7:45 am

Could not access cells in a wxWindow

Post by Liam » Fri Nov 05, 2010 7:24 am

Hi,

Some dialogs in my AUT use wxWidget, and Ranorex Spy could only recognize the top window, but could not access the cell level. Please see below image:
cell_in_wxwindow.png
cell_in_wxwindow.png (6.41 KiB) Viewed 1605 times
Is Ranorex going to support this? Or there is already a way but I didn't find?

Thanks!
Liam

User avatar
sdaly
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: Could not access cells in a wxWindow

Post by sdaly » Fri Nov 05, 2010 9:09 am


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

Re: Could not access cells in a wxWindow

Post by Support Team » Fri Nov 05, 2010 9:52 am

Hi,
Liam wrote:Is Ranorex going to support this? Or there is already a way but I didn't find?
Please could you post us a Ranorex Snapshot of this element? With this snapshot it is much easier to analyze the problem.
How to create a Ranorex Snapshot:
http://www.ranorex.com/support/user-gui ... html#c2072
Or as suggested by sdaly, you can try the GDI Plug-In to get the text of this elements.

Thanks in advance.

Regards,
Peter
Ranorex Team
.
Image

Liam
Posts: 16
Joined: Wed Mar 31, 2010 7:45 am

Re: Could not access cells in a wxWindow

Post by Liam » Fri Nov 05, 2010 10:30 am

Thanks, sdaly, I will try the GDI Plug-In to see if it works for me.

Hi Peter,
Could you help to take a look at the snapshot?

Thank you for your help.

Regards,
Liam
Attachments
wxgrid.rxsnp
(7.81 KiB) Downloaded 141 times

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

Re: Could not access cells in a wxWindow

Post by Support Team » Fri Nov 05, 2010 1:27 pm

Hi,

WxWidgets are currently not supported out of the box. I would suggest you to try the RawText Plug-In. Another solution would be to implement MSAA for this controls. Therefore please take a look to following blog
http://www.ranorex.com/blog/enabling-au ... s-controls

Regards,
Peter
Ranorex Team
.
Image

Liam
Posts: 16
Joined: Wed Mar 31, 2010 7:45 am

Re: Could not access cells in a wxWindow

Post by Liam » Mon Nov 08, 2010 7:40 am

Hi,

I take a try with the GDI Plug-In - very nice feature :)
But, sadly I don't think it fits my situation quite well.
As you can see from my snapshot, we have checkboxes inside the window, for which there is no text. :(
So it seems the only way is to implement MSAA for the control?

Thanks,
Liam

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

Re: Could not access cells in a wxWindow

Post by Support Team » Mon Nov 08, 2010 10:55 am

Hi Liam,

Yes to access the check-box you have to implement MSAA, or you use Image Based recording of Ranorex.
Image Based Automation:
http://www.ranorex.com/support/user-gui ... ation.html

Regards,
Peter
Ranorex Team
.
Image

User avatar
sdaly
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: Could not access cells in a wxWindow

Post by sdaly » Mon Nov 08, 2010 10:55 am

Liam

We have a similar situation with checkboxes - Just look for the item you want to check and use a relative coordinate to click the check box as below.... You can use paint to find out how many pixels to the left you need to go!

Dim rawtextCheck As Ranorex.RawText = "/form/element/rawtext[@caption='" & format(today, "dd/MM/yy") & "']"

rawTextCheck.Click(New Location(-32,6))

Liam
Posts: 16
Joined: Wed Mar 31, 2010 7:45 am

Re: Could not access cells in a wxWindow

Post by Liam » Mon Nov 08, 2010 12:11 pm

Thank you again sdaly, I can see how it works in your way. But sometimes I will need to get the value of myCheckBox.Checked. So I will ask our developer to implement MSAA for this control.