Hiya
Not sure if ive asked this before, but we would like to create a CacheSessionContext on 1 element only, and not all elements. The reason (as always) is we want Ranorex to cache our large MSAA table, but not to cache all other normal operations to text boxes etc.
Is there a way to do that at the moment?
Thanks
CacheSession
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: CacheSession
Hi,
Of course it is possible to use the CacheSessionContext only for one element. Just place the code for the CacheSessionContext around your element in the same way you do it for your large MSAA table.
Regards,
Peter
Ranorex Team
Of course it is possible to use the CacheSessionContext only for one element. Just place the code for the CacheSessionContext around your element in the same way you do it for your large MSAA table.
Regards,
Peter
Ranorex Team
Re: CacheSession
Ok.. Dont suppose you have a code example?
Thanks
Thanks
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: CacheSession
Hi,
Sample Code:
Peter
Ranorex Team
Sample Code:
using (new Ranorex.Core.CacheSessionContext()) { //Do your element actions }Regards,
Peter
Ranorex Team
Re: CacheSession
Ahh what i expected...
The problem is we use the MSAA table, then use a text box, then use the table again etc...
So we do not do all table actions in one block of code
What im looking for is something like:
Dim myTable as Ranorex.Table = ...
myTable.CacheStart
.....
do some ops on table and other controls
...
myTable.CacheEnd
Infact we got a solution
We do the following:
Dim myTable as Ranorex.Table = ...
Dim myRows as IList(of Ranorex.Row) = myTable.Rows
...
use myRows collection to interact not myTable
...
The problem is we use the MSAA table, then use a text box, then use the table again etc...
So we do not do all table actions in one block of code
What im looking for is something like:
Dim myTable as Ranorex.Table = ...
myTable.CacheStart
.....
do some ops on table and other controls
...
myTable.CacheEnd
Infact we got a solution
We do the following:
Dim myTable as Ranorex.Table = ...
Dim myRows as IList(of Ranorex.Row) = myTable.Rows
...
use myRows collection to interact not myTable
...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: CacheSession
Hi,
You can use the CacheSessionContext for each item you want. In you case for each action you want perform, I would put around the session and close it after your actions were performed. For example
Peter
Ranorex Team
You can use the CacheSessionContext for each item you want. In you case for each action you want perform, I would put around the session and close it after your actions were performed. For example
using(new CacheSessionContext()) { //perform table actions } using(new CacheSessionContext()) { //perform some actions on a textbox }Regards,
Peter
Ranorex Team