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
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 |
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 |
How to invoke QTP using Dos prompt ?
What is load testing?
Is there a function to find the number of occurrences of sub strings within a string?
Sql questions to find second max salary and how to use joins
Is it a smart choice to use QTP for backend testing?
what sort of things what u put in Bug Report ?
what is the use of VIRTUAL OBJECTS? explain ?
how to test power point using QTP 8.2 ? What are different methods to retrieve value from Application during runtime ?
when i was doing the Flight reservation with QTP calculating the tickets i got Type mismatch: '[string: ""]' in "If cdbl(tot)=cdbl(p)*t Then" error. where I am doing the mistake Could you please tell me.
Hi, i am rani ,i am putting 1+years of fake exp ,so pls anyone explain how i get project (in real time) ? how it is tested ex: in banking ,test the number of textboxes in one window
What is the difference between gettoproperty and settoproperty?Explain with an example?
How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?