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

What is synchronization? What are the ways you can synchronize?

753


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

959


Explain in brief about the quicktest professional automation object model?

623


I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?

1483


How will you test a keyboard?

694






What are the trigger events in qtp?

680


Is it possible to call from one action to another action in qtp?

677


If created one virtual object? Next time I changed the window position will it work?

686


what is run-time data?

1798


What is a programmatic description?

687


Explain how Does Run time data (Parameterization) is handled in QTP?

637


Is any limitation to xml checkpoints?

654


Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly

1353


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

1667


how interviews will be on QTP?

1602