01-22-2014, 05:46 PM
Hi.
I want a function that will use method on an object depending on the function parameters. For example:
The problem is that the number of parent objects can vary from one to seven. Should I add five more object parameters and an int parameter, that indicates how many parent objects is before the button? Is there any way to make that kind of function without adding a large number of parameters?
I want a function that will use method on an object depending on the function parameters. For example:
Code:
Public Function fnJavaButton (objWindowDesc, objDialogDesc, objButtonDesc, strAction)
Select Case strAction
Case "Click"
JavaWindow("objWindowDesc").JavaDialog("objDialogDesc").JavaButton(objButtonDesc).Click
End Select
End Function
The problem is that the number of parent objects can vary from one to seven. Should I add five more object parameters and an int parameter, that indicates how many parent objects is before the button? Is there any way to make that kind of function without adding a large number of parameters?