How to set the function parameters as optional.

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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Does any one worked on JIL Emulator , Testing with QTP(automation). Trail Version of QTP is not identifying the child objects of JIL emulator, Can any one help me out ,

1374


Have you used xml check point in your project?

546


Explain about the test fusion report of quicktest professional (qtp)?

533


Does QTP record on Objects created on XWindows Environment?

1649


How would you directly trigger javascript in a test?

1465






What is a Patch in QTP?

598


Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...

1783


What is the diff between image and bitmap check point?

590


hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....

2423


Hi ,Can any one pleas explain how to test splash objects using QTP?

1894


I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next

1326


What is an object repository?

593


Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?

1517


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

1375


I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

1717