How to set the function parameters as optional.

Pls anybody can give the answer.. Thanks in advance...

Answers were Sorted based on User's Feedback



How to set the function parameters as optional. Pls anybody can give the answer.. Thanks in adva..

Answer / uday kumar_anem

As far as i am aware, there is no keyword for optional
parameters in VBScripts.

Is This Answer Correct ?    1 Yes 0 No

How to set the function parameters as optional. Pls anybody can give the answer.. Thanks in adva..

Answer / saroj

In function parameter you can't use optional option. But
you can mark the statements inside the function as optional
by putting keyword "OptionalStep" before the statement.

ex:
Function login(name,passwd)

OptionalStep.Brw("login").Webedit("name").set name
Brw("login").Webedit("passwd").set passwd
Brw("login").Webbutton("ok").click
End Function

This may help you.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

w is fragmentation and paging

1 Answers   MBT,


where the object repository is located?how to choose the object repository as shared or action object repositories?

4 Answers   Datamatics,


3. How to handle the exceptions using recovery secnario manager in Qtp?

2 Answers   Wipro,


Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?

0 Answers   CTS,


To which environments does quicktest professional supports?

0 Answers  






can we install qtp on server machine and do automation of application which is installed on client machine.If yes then how? If no then is there any other automation tool for this (client-server) senario.

4 Answers  


What are the differences between QTP 9.2 and 10? please explain e indetail......

2 Answers   Wipro,


I encountered with very strange problem in qtp while writing the script i written the code window"regexpwndclass:=XLMAIN").window"regexpwndtitle:=Open" ).Exit this code was working fine for about 10-15 times i executed the script but after some time qtp started giving the error with the same code the error is "Object doesnt support this method or function window(...).window(..)" then i modified the code with only window"regexpwndtitle:=Open").Exit in place of window"regexpwndclass:=XLMAIN").window"regexpwndtitle:=Open" ).Exit now again its working fine i cannot understand what thing is creating the problem if same code executed successfully in starting for about 10 times then why it is giving the error now can anyone give the reason .

0 Answers  


Diff. between keyword driven Data driven testing?

8 Answers   CTS, IBM,


anybody wants to learn QTP with realtime implementations and complete framwork contact to this mail id ciraaj@gmail.com

1 Answers  


what is the hierarchy to use properties in descriptive programming

0 Answers  


What is the Difference Between Quick Test Pro and Quick test professional?

5 Answers   Infotech,


Categories