How do you return a value from a function



How do you return a value from a function..

Answer / prabhakar

msgbox "returned value =" &example

function example()
a=2
b=3
example = a+b
end function.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More QTP Interview Questions

How many types of Check Point in QTP

2 Answers   R Systems,


How should i get name of the screen? Ex:There is a "submit" button.If i clicked on the submit button it opens a screen. I want that screen name.How can i get that screen name I dont have any property regarding that screen. If suppose we cliked on the screen , Then QTP captures the screen properties then i can get the screen name by using GETROPROPERTY But i want the screen name without clicking the screen. ("I am using the "settoproperty" for Second screen by using fist screen properties") Please tell me anyone

3 Answers   Livetek,


What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?

0 Answers  


How to execute the test cases using QTP. i.e What is the use of QTP while execution

2 Answers  


Is there anyway to have QTP go into a website and map out every object before I actually record any tests? I basically want to map out a website with all the objects and build a complete repository. The reason is because I'm running into issues with hierarcical objects. for example: Browser("ABC company- Home").Page("ABC company - Home").Link ("About Us").Click Browser("ABC company - Page 2").Page("ABC company - Page 2").Link("About Us").Click Both these links ("objects" and I use that term loosely as I'm trained mostly in OO programming) go to the same place but but the object heirarchies (pages) are different. I want a repository that will find any possible link on any possible page without having to manually record it. Is there a way to do this?

1 Answers  






What is Associate Repository in QTP 9.2 ?

0 Answers  


Which Databases supports for QTP?

2 Answers  


actuall wat my doubt is:while doin regression testin we enter all +ve & -ve data....system has to accept +ve and reject -ve data.in such case we get a popup window sayin that wrong entry...now i wan to overcome this popup window..how do i go further....plz explain.i tried thru rec.scenario but of no use.

1 Answers  


regular expression in qtp standar check point for months from accepting months from january to december only

0 Answers  


How to delete an object from the object repository?

0 Answers  


for example u can take ebay or plifcart online shoping web application--------- write acode in vbscript in qtp---- search box and write (iphone6)and click on go button then opened diff prise iphones in next page but u can select 30,000 to 90,000 list pls write code? 

2 Answers   FFASVA, Genpact, Wipro,


How to use checkpoints in qtp ?

0 Answers  


Categories