Hi
I am new to QTP. we are planning to implement automation
for the application.
I am trying to execute the following script:
Set ExcelObj=CreateObject ("Excel.Application")
ExcelObj.WorkBooks.Add
Set NewSheet=ExcelObj.Sheets.Item(1)
NewSheet.Name="Order"
ExcelObj.Cells(1, 1).Value = "Name"
ExcelObj.Cells(1, 2).Value = "Ordernum"
ExcelObj.Cells(2, 1).Value = "nam"
ExcelObj.Cells(2, 2).Value = "21"
ExcelObj.ActiveWorkbook.SaveAs "c:\test1.xls"
ExcelObj.Quit
Set ExcelObj = Nothing

in the above script for the line(ExcelObj.Cells(2, 2).Value
= "21")
it is inserting the value 21 successfully.this is fine
But if i want to insert a variable instead of the constant
value then what should be the modification in the script.

For example: If user retrives a value
throug "GetRoProperty" and wants to insert the value into
then how the script changes?



Hi I am new to QTP. we are planning to implement automation for the application. I am trying to ..

Answer / sri

Hi...don't mind...QTP Questions, u can post in Automation
Tools Section...this Section is only for Manual Testing!!!

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

How can i store runtime value through vb script while using qtp

1 Answers  


we have one text box and one list box(list box appear in same page or another page) what ever the text enter in text box that must be displyed in list box as first one. for example if we enter 10 in text box that is the 1st item in list box . after that we enter 11 then 11 is the 1st item and 10 is 2nd item. the maximum limit of list box is 10 items. if we enter 11th item the 10th item is deleted and llth one is add as 1st one and 9th one goes to 10th position part2:maore than the answer for this question i want the the reason why testers go for this kind of risk.what is the use of we testers having these kind of attempts.is that not the problem with the developer .pls answer .real time users of tools.in which way these solutions help to test with r without affecting the developed souce code.

3 Answers  


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

0 Answers  


Give answer with example what is orthogonal array testing technique?

1 Answers   CTS, Wipro,


please write a script to find the text in a application. Note: i dont know the location of that text where it is located. just like negative testing.

2 Answers   BSL,


how to retrieve the xml file data through qtp. can anybody send script for this..

3 Answers   Synechron,


Once we get the Test Result from QTP.,I Have to convert into Excel file format..Is it possible..Can any gudie me regarding this... For Example : Total Test Case is : XXXXX Test Case passed : XXX Test Case Failed : XXX -------- Total XXXXXX ---------

6 Answers  


How can we encrypt the username using recording mode in login window? There is 2 encrypted types what are it

1 Answers   TCS,


can we call a test in another test?

3 Answers   iFocus,


what to do if application have 3 "ok" button with same logical name and same properties, how qtp can identify them.

11 Answers   Infosys, Intel,


Can any one please list me out the shortcut keys for some functionalities in the QTP .. for example ..to record...to run...etc

6 Answers   Keane India Ltd,


Is there any site to download QTP....otherwise tell me the way how to get the QTP sofware??????????????????? Thnx in advance

5 Answers   Cegonsoft,


Categories