How to data driven test for Win objects in QTP ?
Answer / Sanjay Kumar Piporiya
Data-driven testing in QuickTest Professional (QTP) involves using external Excel files or databases to feed test data during the execution of your tests. To perform data-driven testing for Win objects, follow these steps:n
1. Create a table in an Excel file containing the necessary input and output data.
2. In QTP, create a Test Object Repository (TOR) that includes all the Win objects you want to test.
3. Use functions like Table(row, column) or TableDirect(filename, sheetname, row, column) in your test script to access data from the Excel file.
4. Use the Win API functions to interact with the Win objects using the input data fetched from the Excel file.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the disadvantages of recording test cases in qtp?
To count the no of links present in the yahoo home page i have written the script like this Set fileSysObject=createobject("Scripting.FileSystemObject") Set linksFileName=fileSysObject.opentextfile ("D:\samplelinkfile.txt",2,true) Set linkDescObj=description.Create linkDescObj("micclass").value="Link" Set noOfLinks=browser("yahoo").Page("Yahoo! India").ChildObjects(linkDescObj) For i=0 to noOfLinks.count-1 linkName=noOfLinks(i).getROProperty("name") linksFileName.writeline(linkName) Next linksFileName.close Set fileSysObject=nothing While running the script it showing error that object "yahoo"isnot found in the object repository. Is there any setting before running the script? if yes what is the steps for it.Im using QTP9.0
how to recall a function in QTP?
when there is a task that gets repeated in multiple scripts what do you do in QTP?
In VSS, HoW the documents send to local folder? copy paste or any other? plz explain about VSS TOOL kit?
What is the file extension of the code file in qtp?
write a script for get the following result: username password frm the string1="A=username" string2="B=password"
How to export data present in Datatable to an ".xls" file?
Can we directly automate testscripts accrdoing to requirements
2 Answers CitiGroup, Novartis,
How can I change object description or check point values in qtp?
I encountered with very strange problem in qtp while writing the script i written the code window"regexpwndclass:=XLMAIN").window"regexpwndtitle:=Open" ).Exit this code was working fine for about 10-15 times i executed the script but after some time qtp started giving the error with the same code the error is "Object doesnt support this method or function window(...).window(..)" then i modified the code with only window"regexpwndtitle:=Open").Exit in place of window"regexpwndclass:=XLMAIN").window"regexpwndtitle:=Open" ).Exit now again its working fine i cannot understand what thing is creating the problem if same code executed successfully in starting for about 10 times then why it is giving the error now can anyone give the reason .
What are the methods of the TextStream object that are used for reading from a text file?