Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



I have 2 Environment variable which holds int. I called into my test and addedup. but output is conc..

Answer / reddz

try this way

k=cint(environment.value("a"))+cint(environment.Value("b"))
msgbox k

Is This Answer Correct ?    5 Yes 1 No

I have 2 Environment variable which holds int. I called into my test and addedup. but output is conc..

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

I have 2 Environment variable which holds int. I called into my test and addedup. but output is conc..

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

Post New Answer

More QTP Interview Questions

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?

2 Answers  


HoW to open QTP in Real time.after getting the qtp window how to log in .pl answer real time people

3 Answers   GE,


How to record application running on the Virtual machine?

0 Answers  


What is descriptive programming?

15 Answers   Wipro,


what is the use of VIRTUAL OBJECTS? explain ?

10 Answers   ABC Infotech, IBM, TCS,


How to connect to oracle(sqlserver) database to QTP

3 Answers   CTS,


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.

4 Answers  


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.

0 Answers  


How to retrieve the property of an object?

1 Answers  


What is the extension of the recovery scenario file in qtp?

0 Answers  


what is the process to follow between writing the test cases & then atomating it?

1 Answers  


what is batch testing?

1 Answers  


Categories