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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

1304


What is contained in the object repository?

604


can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?

1394


Hi All, How to Compare two strings character by character in QTP

949


give me an example where u used good judgement and logic in solving a problem

3346






How to create a standard checkpoint ?

550


please post the interview questions for QA position in FACTSET

3938


i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.

1522


Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

636


What are table and db checkpoints?

584


hi i want license key for qtp 9.2 pls its adjust product name : quick test professional locking code :8 - 54A6A license type : seat license maintenance number : 88888888-8888 pls send license key to my email id borusu.ramkumar@gmail.com

3692


Explain advantages and disadvantages of ddf?

592


How many types of Automation frameworks are there in UFT? Describe them.

548


How many types of parameters are available in quicktest professional?

514


Explain hybrid framework with advantages and disadvantages?

538