I have 2 Environment variable which holds int. I called into my test and addedup. but output is concatenating the values instead of Sum. Ex. Envi("a")= 10, Envi("b") = 20, c= Envi("a")+ Envi("b"). msgbox c ( Ans.1020). How to overcome this pblm?
Answers were Sorted based on User's Feedback
Answer / reddz
try this way
k=cint(environment.value("a"))+cint(environment.Value("b"))
msgbox k
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / arun
Please try
Environment("a")=10
Environment("b")=20
msgbox (cint(Environment("a"))+cint(Environment("b")))
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / manjunathareddy
First Define User-Defined internal environment variable
To define an internal environment variable follow the steps
below
• Open the test in which you want to define the variable
• Navigate to File >> Settings >> Environment
• From the variable type drop down, select User-defined
• Click the plus button on top right
• In the pop-up you add name (variable name) say a and
value (variable value) say 10
• Again Click the plus button on top right
• In the pop-up you add name (variable name) say b and
value (variable value) say 20
• Click OK
-------------------------------------------------------
Dim c
c=Environment.Value("a")&Environment.Value("b")
Msgbox c
| Is This Answer Correct ? | 0 Yes | 1 No |
Can the mode of object repository be change during run time? Eg. if the mode is per-action during design time can i change it to shared and vice-versa? Any scripting possible?
HoW to open QTP in Real time.after getting the qtp window how to log in .pl answer real time people
How to record application running on the Virtual machine?
What is descriptive programming?
what is the use of VIRTUAL OBJECTS? explain ?
10 Answers ABC Infotech, IBM, TCS,
How to connect to oracle(sqlserver) database to QTP
hi all, I have installed QTP successfully on windows vista. I am able to record and run on windows applications, but facing problem with web applications. While recording, I am able to open the web application, but when I click on any object or give login name and password, the events are not getting recorded in QTP. Could anyone solve the problem. Any settings to be done for web applications other than selecting web-addin? Waiting for replies. Thanks in advance.
I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.
How to retrieve the property of an object?
What is the extension of the recovery scenario file in qtp?
what is the process to follow between writing the test cases & then atomating it?
what is batch testing?