Ask a Question

For Loop does not incrementally increase unless table is refreshed.

SOLVED
jg0888
Contributor

For Loop does not incrementally increase unless table is refreshed.

I am using a KeywordTest, and the For Loop operation.

 

My Example: I have NameMapped "Cell(ProjectVariable, ColumnIndex)", where the Project Variable is Table_RowIndex. Since this is the value I want to incrementally increase in order to search down the table column for a specific value. When I refresh the page, it will increase this RowIndex; however, when I do not refresh the page, it does not increase the Row Index.

 

Has anyone run into this issue before? If so, how did you resolve the issue?

 

I attached the For Loop operation that I am running and the name mapping showing the variable. Please let me know if more information is necessary. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
tristaanogre
Community Hero

Re: For Loop does not incrementally increase unless table is refreshed.

Mapped information is cached when accessed within the same test case.  So, when you refresh the page, you are actually refreshing that cache because the cached object handles no longer exist.  If you want to force this without actually doing a page refresh, before you reference the mapped object, on the table itself, call "RefreshMappingInfo" and see if that helps.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

2 REPLIES 2
tristaanogre
Community Hero

Re: For Loop does not incrementally increase unless table is refreshed.

Mapped information is cached when accessed within the same test case.  So, when you refresh the page, you are actually refreshing that cache because the cached object handles no longer exist.  If you want to force this without actually doing a page refresh, before you reference the mapped object, on the table itself, call "RefreshMappingInfo" and see if that helps.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

jg0888
Contributor

Re: For Loop does not incrementally increase unless table is refreshed.

@tristaanogre It appears to be working when I use the action item "RefreshMappingInfo" on the table. Thank you so much!

cancel
Showing results for 
Search instead for 
Did you mean: