Wednesday, December 2, 2009

35. Flat Files:

It is another method to apply the multiple no of inputs to the Script through the Notepad.
Step 1: Open the Notepad, and Enter all the Templates and Inputs for the Templates that you want to apply the input for Script.
Step 2: Save the notepad as .txt.
Step 3: Open the Test in Qtp.
Step 4: Enter the Script as
E.g.: Set fso=createobject ("scripting.filesystemobject")
Set f=fso.opentextfile (" ", 1)
f.skipline
While f.atendofline<>true
s=f.readline
arr=split (s," ")
Dialog ("Login").WinEdit ("Agent Name :") .Set arr (0)
Dialog ("Login").WinEdit ("Password :") .Set arr (1)
Wend
Step 5: Execute the Script to analyze the Result.

No comments:

Post a Comment