Unable to retrieve table object information

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Pawel
Posts: 9
Joined: Tue Sep 03, 2013 5:57 pm

Unable to retrieve table object information

Post by Pawel » Tue Oct 22, 2013 7:13 pm

Hello,

I have a webpage which has a table. An user can be added to this table and will appear in the list. During my test execution I can retrieve the table data correctly, however, after sorting the table through the webpage I can no longer obtain data regarding the table. I have the repo item use cache option set to False. I cannot take a snapshot of the element after since the error I get is the element is not valid anymore. I'm using Ranorex 4.0.6 against IE 10. Any way to get the update element data?

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Unable to retrieve table object information

Post by krstcs » Tue Oct 22, 2013 7:16 pm

You said that you set the element to not use caching, but did you set the element's parent to not use caching as well? It may be that the parent that is being updated also. I would continue up the repository tree turning off caching for each layer until you get the desired behavior.
Shortcuts usually aren't...

Pawel
Posts: 9
Joined: Tue Sep 03, 2013 5:57 pm

Re: Unable to retrieve table object information

Post by Pawel » Tue Oct 22, 2013 7:28 pm

Yup, the element only has one parent and it is set to not use caching.

Pawel
Posts: 9
Joined: Tue Sep 03, 2013 5:57 pm

Re: Unable to retrieve table object information

Post by Pawel » Tue Oct 22, 2013 7:35 pm

To add, when in Ranorex Spy I right click the element after it has become invalid and perform the action Ensure Visible the data is refreshed and appears. However when I call EnsureVisible() the element data is not updated through code.

Pawel
Posts: 9
Joined: Tue Sep 03, 2013 5:57 pm

Re: Unable to retrieve table object information

Post by Pawel » Tue Oct 22, 2013 8:25 pm

To add some more information. The object is implemented using a web grid in MVC. Also I have tried the same scenario in Chrome and somewhat similar results except that when I update the element data in Spy I have the child items greyed out in the View Spy.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Unable to retrieve table object information

Post by krstcs » Tue Oct 22, 2013 8:52 pm

I would guess that there is something changing dynamically in your system under test so that the identification fails the next time.

SPY will update the path if you are just re-tracking. I would suggest opening another SPY at the same time and using the first one to track the item BEFORE the update, and the second to track it AFTER the update.

Compare those two paths and see what (if anything) is different.

You may need to change what you are using to ID the objects, or you may need to ask your developers to include some more uniquely identifiable attributes (MSAA would be great since that is what MS put it in there for).
Shortcuts usually aren't...

Pawel
Posts: 9
Joined: Tue Sep 03, 2013 5:57 pm

Re: Unable to retrieve table object information

Post by Pawel » Tue Oct 22, 2013 9:04 pm

The paths are identical. The information appears to be identical itself between the before and after. Like I said if I call ensure visible on the repo item the values get successfully updated to the correct state, yet this call through code doesn't have the same effect.

Pawel
Posts: 9
Joined: Tue Sep 03, 2013 5:57 pm

Re: Unable to retrieve table object information

Post by Pawel » Wed Oct 23, 2013 4:05 pm

Another question is does Ranorex fully support a webgrid with ajax in MVC4?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Unable to retrieve table object information

Post by Support Team » Thu Oct 24, 2013 1:51 pm

Hello Pawel,

Please send us the URL of your web page that you try to automate.
This would help to reproduce your issue.

In general, we support a webgrid with ajax in MVC4.
Do you experience any issues other than the mentioned one?

Thanks in advance.

Regards,
Markus (T)

Pawel
Posts: 9
Joined: Tue Sep 03, 2013 5:57 pm

Re: Unable to retrieve table object information

Post by Pawel » Thu Oct 24, 2013 7:19 pm

Support Team wrote:Hello Pawel,

Please send us the URL of your web page that you try to automate.
This would help to reproduce your issue.

In general, we support a webgrid with ajax in MVC4.
Do you experience any issues other than the mentioned one?

Thanks in advance.

Regards,
Markus (T)
Email sent. Nothing right now comes to mind other than this one issue.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Unable to retrieve table object information

Post by Support Team » Fri Oct 25, 2013 10:33 am

Hello Pavel,

Thank you for your email.

It seems that you try to use the cached element instead of the repository item in your test.
Please try to use the repository item instead of the cached element since it works on the live data.

Regards,
Markus (T)