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

Why bpt?

0 Answers  


what is the diff between Procedure and function

3 Answers   iFlex,


how to merge 2 object repositories in qtp 9.0.what is use of merge and y merge is used?

1 Answers  


LINUX environment supports QTP or not? LINUX environment supports QC or not?

4 Answers  


What is object identification?

8 Answers   Wipro,


In QTP whether is it possible to call a function from one action to another action?

1 Answers  


what is the use of automation objective model?where is used? plz tell me

2 Answers  


How to delete an object from the object repository?

0 Answers  


wt is automation framework? give explonation?

1 Answers   Mindlance,


Hi All I'm new in QTP. I'm trying to make test cases for login on Flight.exe . I have parametrise the agentname and password field. So wen wromg agent name or password is entered it show a dialog box with proper message(Like: "Wrong Password" or :Please enter Password" etc) and OK button. I have created If else block. Now my problem is i want to make checkpoint on error message Dialog box. But each time i create a checkpoint it shows same text message. So how i can check that message is there or not.

2 Answers  


I am struggling to understand QTP more from descriptive programming point of view. Is it easy to learn good QTP in South india by good faculty than north india? I found a great lack of institution in here. can you suggest me better instituion. I am holding two years of experience in same company, is there possibility in south india for me?

1 Answers  


what is the difference between invoke application and system.util.run

24 Answers   HP, Syntel,


Categories