how can i pass parameters into function?

Answer Posted / deven

Function MyFunction(Argument1, Argument2)
MyFunction = Argument1 + Argument2
End Function

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1800


We stored into the objects OR and then write the scripting

1630


Mention the test steps of qtp.

630


I have created 3 actions in test action1, action2, action3 but I want run action 1,action 3,action2 how can you change in the actions in keyword view?

715


requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how

1589






How to capture a window in QTP?

1613


How does quicktest professional (qtp) identifies the object in the application?

664


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1591


Hoe can we do retesting using functions please give the code for it using login page

1650


how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me

2561


Which recording modes need more memory?

664


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

1427


what is the diff b/w assistive and mandatary rules of object repository in QTP???

1748


Problem with XML checkpoint in QTP ?

3602


How to use output values in qtp ?

641