Iterator IsEOF returning true ... I am certain I am doing something dumb
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2018
06:47 AM
12-21-2018
06:47 AM
Iterator IsEOF returning true ... I am certain I am doing something dumb
I have this code which is trying to loop through the rows of a table variable.
var checkStaff = KeywordTests.InstructorInquirySmoke.Variables.Staff; var iterator = checkStaff.Iterator; var staffCode; iterator.Reset(); while(!iterator.IsEOF) { staffCode = iterator.Value(0); if (Staff.IsStaffExists()) { Log.Checkpoint("Instructor " + staffCode + " exists.", "", pmNormal, attr, Aliases.browser.pageMain.Picture()); } else { Log.Error("Instructor " + staffCode + " DOES NOT exist.", "", pmNormal, attr, Aliases.browser.pageMain.Picture()); } iterator.Next(); }
Iterator is not entering while loop. I am looking at checkStaff in debug watch. It (rightly) has 2 rows. iterator is showing as an object but with no details.
Can someone spy what I am doing wrong? I confess being the friday before a holiday I strongly suspect operator error.
Solved! Go to Solution.
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2018
07:06 AM
12-21-2018
07:06 AM
Hi,
According to the documentation and the code samples, .IsEOF() is a method, not a property.
Have you tried
while(!iterator.IsEOF())
instead of your
while(!iterator.IsEOF)
? Does it help?
Regards,
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2018
07:07 AM
12-21-2018
07:07 AM
Sigh. Thanks.
