Action1: I have a value "test" stored in a variable X.
I want to use that variable X in Action2 .. how?



Action1: I have a value "test" stored in a variable X. I want to use that variable X in A..

Answer / litan

Use environment variables.

Action 1 : Environment.Value("x")="test"



Value of x=Environment.Value("x") can be used any action.

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More QTP Interview Questions

How to supress warnings from the "Test results page"?

6 Answers   BirlaSoft,


I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab1"" value=""Save"" type=""button"">", Second button "html id:=btnSave "outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"">", Third button "html id:=", outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab Fourth button "html id:=btnSave outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"" 5th button "html id:=", "outerhtml:=<input class=""Button"" onclick=""document.getElementById('a5').click();"" value=""Save"" type=""button"">",

0 Answers  


Using Object Repository is a advantage or disadvantage?

6 Answers   Wipro,


Is there any vbscript in QTP for Data Driven Test instead of using the option provided by QTP?

2 Answers  


what you mean by artifact,milestone...

0 Answers  


What does VBS file contain..? what is VBS file.?

4 Answers  


Where we can use the synchronization?

0 Answers  


Scenario:2 combo boxes.1st combo contains a,b,c,d.2nd combo contains 10..20,20..30,30..40,.Selecting 'a' shld display 10...20,'b' shld display 20..30.. and so on.tell d script? 2.Random testing of 500 test cases in qtp?

1 Answers  


What is throw object?

1 Answers   AZTEC,


After i ran the Test in Batch mode i didn't get any results. Can any one let me know how it can be done?

3 Answers  


Hi, My problem is as follows. I recorded a script that created Object repository of each action i recorded. But later I added one more step (which was to enter data in a textfield) into the script through expert view. But as no repository for this newly added step exists in the test, my script fails. So please help me to sort this problem that how can I create object repository of a new step in an existing test. Thanks everyone

1 Answers  


1. wat are the main diff b/w QTP 8.0 AND QTP 9.2 ( not user interface) 2. wat is the meaning of Keyword in keyword driven frame work? 3. how u will handle the unknown errors while exucution. (not recovery scenario)

0 Answers   HCL,


Categories