Dynamic invoke enables you to directly call methods, retrieve properties, or set properties, on an actual instance of a control in the application under test. You can also call methods and properties that are not available in the Silk Test Workbench API for this control. Dynamic invoke is especially useful when you are working with custom controls, where the required functionality for interacting with the control is not exposed through the Silk Test Workbench API.
Call dynamic methods on objects with the Invoke method. To retrieve a list of supported dynamic methods for a control, use the GetDynamicMethodList method.
Call multiple dynamic methods on objects with the InvokeMethods method. To retrieve a list of supported dynamic methods for a control, use the GetDynamicMethodList method.
Retrieve dynamic properties with the GetProperty method and set dynamic properties with the SetProperty method. To retrieve a list of supported dynamic properties for a control, use the GetPropertyList method.
control.Invoke("SetTitle", "my new title")
Both primitive types, such as int, and object types, such as java.lang.Integer are supported. Primitive types are widened if necessary, allowing, for example, to pass an int where a long is expected.
Enum parameters must be passed as string. The string must match the name of an enum value. For example, if the method expects a parameter of the enum type, java.sql.ClientInfoStatus you can use the string values of REASON_UNKNOWN, REASON_UNKNOWN_PROPERTY, REASON_VALUE_INVALID, or REASON_VALUE_TRUNCATED
Allows calling methods with list, array, or var-arg parameters. Conversion to an array type is done automatically, provided the elements of the list are assignable to the target array type.
Control parameters can be passed or returned as TestObject.