| || |
File Handling in Winrunner
I want to open up a particular txt file from Winrunner.
Search for a particular keyword say for example href and get the corresponding value and store it in some variable in the script.
How do i do this?
Re: File Handling in Winrunner
Look in the TSL ONline Reference in the WinRunner Help menu.
Search for and expand on the functions that begin with the word "file". Expand on those and you will see how to use and examples of usage.
With those functions you will be able to open a file and read it line by line - scanning each line for a match (<- hint) of href. Then you grab a substr <- function name of the line where you found href. Naturally, you will have to apply an offset from href to get the associated value and capture it to a variable.
Let us know how you fare.