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? I used the add fn also..

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 co..

Answer / sudarshan

Use
c= Cint(Envi("a"))+ Cint(Envi("b"))

Is This Answer Correct ?    14 Yes 0 No

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

Answer / murali yeluri

yes, u r right. I got it. thanx

Is This Answer Correct ?    4 Yes 0 No

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

Answer / neeraj kumar

Hi! Try this code, hope you will get the right answer.....

Environment.Value("MyVariable")=10
A=Environment.Value("MyVariable")
Reporter.ReportEvent micPass, "The value of A: ", A
Environment.Value("MyVariable1")=20
B=Environment.Value("MyVariable1")
Reporter.ReportEvent micPass, "The value of B: ", B
C=A+B
msgbox C

if i am wrong please confirm me back...


Regards
Neeraj Kumar

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More QTP Interview Questions

How to create an Action Template?

1 Answers  


can we run the scripts of qtp 8.2 in the qtp7.0?

1 Answers  


what is the difference between Table checkpoint and Database checkpoint in QTP

2 Answers   Ordain Solutions,


what is the difference between link and hyper link?

1 Answers   Ordain Solutions,


Distinguish between manual testing and automation testing

2 Answers   HCL,






What is the difference between keyword view and expert view?

0 Answers  


How can I change object description or check point values in qtp?

0 Answers  


Why you are Using Descriptive programming instead of Object Repository?

11 Answers  


Explain me in deatail about DATADRIVEN framework including scripts ?(realtimes plz)(Chandana)

4 Answers   Wipro,


in qtp wha t is synchronisatin pt,what is the maximam time out

3 Answers  


I would like to do some certifications in QTP. please suggese what kind of certifications can i do. I am currently put up at chennai. So please suggest some reputed centres where these courses are offered.

1 Answers  


I want to test advanced Java applications what kind of add- ins I have to install?

1 Answers  


Categories