Casting Element to Table

Class library usage, coding and language questions.
let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Casting Element to Table

Post by let » Fri Dec 17, 2010 12: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?"

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

Re: Casting Element to Table

Post by Support Team » Fri Dec 17, 2010 10: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
.
Image

let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Re: Casting Element to Table

Post by let » Fri Dec 17, 2010 4: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.

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

Re: Casting Element to Table

Post by Support Team » Mon Dec 20, 2010 10: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
.
Image

let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Re: Casting Element to Table

Post by let » Wed Dec 22, 2010 9: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 167 times

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

Re: Casting Element to Table

Post by Support Team » Mon Dec 27, 2010 3: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
.
Image

let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Re: Casting Element to Table

Post by let » Thu Dec 30, 2010 8: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!