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 the diff between image and bitmap check point?

603


Whether qtp 9.0 supports Test director8.0

2130


explain abt dyanamic changing object with example?

1909


hou can we use vb script in qtp could u tell me breafly

1747


Explain different types of action in qtp?

578






When you open QTP, how many sheets you can see?

664


How would you directly trigger javascript in a test?

1477


1.Write a CRITICAL test cases for calculator ? 2.What is the difference b/w FRS and SRS documents ? 3.What is Component ? 4.What is object ? 5.what is the difference b/w static and dynamic descriptive programming ?

1596


What is an optional step in qtp ?

643


Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

598


I recorded a Web App with a Oracle backend using QTP 9.5 and for some reason the scripts don't play back> What am I missing at this point. I recorded the same Apps under Sybase and they work great. This is Oracle 10g. Why won't my scripts play back.

1524


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

1521


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?

541


What are benefits of qtp?

591


What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?

616