File Pointers Reset When Using Subroutines - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: File Pointers Reset When Using Subroutines (/Thread-File-Pointers-Reset-When-Using-Subroutines) |
File Pointers Reset When Using Subroutines - zunebuggy - 08-19-2020 I have a text file I am reading line by line that is driving my testing. I know I could have used the UFT Data area as well but we already have these text files that are easy to read and parse, but are a bit of a pain to export to UFT or Excel. because each line is different. I have a subroutine that reads each line of the file until End of File is reached. I also have code that based on the line of text read, will jump to another sub-routine and do something and then jump back. To my surprise and unlike an Excel macro, this is starting my file read over again from the beginning and leading to duplicate tests. What is the best way to fix this issue? Thank you, Zune |