Back to previous page

Ranorex Spy, Recorder, and Studio.
mstachyra
Posts: 1
Joined: Fri Feb 28, 2014 3:56 pm

Back to previous page

Post by mstachyra » Wed Mar 05, 2014 10:51 am

Hi,
I have one question.
Example: I have a table in which each row have atag items and other things.
And when I loaded the entire list of rows and using the "for" or "forech" loop pass to the next page by clicking on the Atag and then come back to the table are all my items that were previously loaded are cleared.
How can cache information about my list of rows?

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

Re: Back to previous page

Post by Support Team » Fri Mar 07, 2014 4:59 pm

Hello mstachyra,

Unfortunately it is not possible to cache this items.
But you can use a little workaround in which you load the items after every history.back() new.

for example:

Code: Select all

WebDocument webdocument = "/dom[@domain='*****']";
IList<ATag> ataglist = repo.******.Find<ATag>("/dom[@domain='****']//atag[*****]");

int counter = ataglist.Count;

for(int i=1;i<=counter;i++)
{
	webdocument.WaitForDocumentLoaded();
	ataglist = repo.******.Find<ATag>("/dom[@domain='****']//atag[*****]["+(i)+"]");
	foreach(ATag AElement in ataglist)
	{
	//yourcode
	.....
	webdocument.ExecuteScript("history.back()");
	.....
	}
}
Kind regards,

Markus (S)
.
Image