Page 1 of 1

Unable to retrieve table object information

Posted: Tue Oct 22, 2013 7:13 pm
by Pawel
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?

Re: Unable to retrieve table object information

Posted: Tue Oct 22, 2013 7:16 pm
by krstcs
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.

Re: Unable to retrieve table object information

Posted: Tue Oct 22, 2013 7:28 pm
by Pawel
Yup, the element only has one parent and it is set to not use caching.

Re: Unable to retrieve table object information

Posted: Tue Oct 22, 2013 7:35 pm
by Pawel
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.

Re: Unable to retrieve table object information

Posted: Tue Oct 22, 2013 8:25 pm
by Pawel
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.

Re: Unable to retrieve table object information

Posted: Tue Oct 22, 2013 8:52 pm
by krstcs
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).

Re: Unable to retrieve table object information

Posted: Tue Oct 22, 2013 9:04 pm
by Pawel
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.

Re: Unable to retrieve table object information

Posted: Wed Oct 23, 2013 4:05 pm
by Pawel
Another question is does Ranorex fully support a webgrid with ajax in MVC4?

Re: Unable to retrieve table object information

Posted: Thu Oct 24, 2013 1:51 pm
by Support Team
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)

Re: Unable to retrieve table object information

Posted: Thu Oct 24, 2013 7:19 pm
by Pawel
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.

Re: Unable to retrieve table object information

Posted: Fri Oct 25, 2013 10:33 am
by Support Team
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)