Casting Element to Table : Automation API

Casting Element to Table

Class library usage, coding and language questions.

Casting Element to Table

Postby let » Fri Dec 17, 2010 1:03 am

In the processing of updating some old code (last executed in July), an object in the AUT (Flex) which was formerly a table is now being identified as an element.

With several other functions dependent on this object being a table, what are my options for casting the "element" to a "table?"
let
 
Posts: 16
Joined: Wed Oct 20, 2010 8:00 pm

Re: Casting Element to Table

Postby Support Team » Fri Dec 17, 2010 11:44 am

Hi,

which version of Ranorex do you use?
Have you updated Ranorex since the last time your automation behaved as supposed?
Have you updated your application under test?
If you did, what did you change in code?

Thanks,

Regards,
Tobias
Support Team
User avatar
Support Team
Site Admin
 
Posts: 4838
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Casting Element to Table

Postby let » Fri Dec 17, 2010 5:31 pm

We're now running 2.3.5, and I wasn't with the company in July, but I'm assuming the tests were running on a previous version (2.3.3 maybe?).

The code in the AUT hasn't changed in this area and one of the developers confirmed that the inheritance path is still:
Datagrid ==> CheckSelectDatagrid.mxml

Which suggests to me that it should be recognized as a table.
let
 
Posts: 16
Joined: Wed Oct 20, 2010 8:00 pm

Re: Casting Element to Table

Postby Support Team » Mon Dec 20, 2010 11:03 am

Hi,

can you please send us some code snipet of your datagrid?
And additional can you please send us a snapshot of your application under test.
See the following section in the Ranorex User Guide on how to create Ranorex snapshots:
http://www.ranorex.com/support/user-gui ... html#c2072
Thanks.

Regards,
Tobias
Support Team
User avatar
Support Team
Site Admin
 
Posts: 4838
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Casting Element to Table

Postby let » Wed Dec 22, 2010 10:45 pm

The snapshot of the element is attached.

The object is defined in our repository as .//table[@id='resultsGridGroups'].

Let me know if you need any additional material.
Attachments
group_view.rxsnp
(78.87 KiB) Downloaded 22 times
let
 
Posts: 16
Joined: Wed Oct 20, 2010 8:00 pm

Re: Casting Element to Table

Postby Support Team » Mon Dec 27, 2010 4:04 pm

Thank you for the snapshot.
Somehow Ranorex assigns the wrong base class to your table (and doesnt recognize it )
Did you update the Ranorex library swc (or the Ranorex module swf, dependent on what you are using) to the version included in 2.3.5 (or 2.3.6) ? Otherwise I am not sure what could cause that problem.

Could you try and identify the class inheritance hierarchy of your grid (for example)

type: com.j2w.views.members::MembersSearch_GroupsGrid
parent type (?): com.j2w.controls::CheckSelectDatagrid
DataGrid should be somewhere in the list...

Michael
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4838
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Casting Element to Table

Postby let » Thu Dec 30, 2010 9:56 pm

Good call. I wasn't aware that we were still using the 2.3.3 swc file. When I run the test against a version built with the 2.3.6 version, the issue seems to be resolved.

Thanks for your assistance!
let
 
Posts: 16
Joined: Wed Oct 20, 2010 8:00 pm


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests