It's not possible to call methods with DynamicInvoke
that require arguments that can't be represented by Silk Test's types or offer a simple constructor which can be auto-detected (default constructor, or constructor taking a String
argument).
That being said, there might be solutions to your issue:
- If you have access to the application's code, you can add a method to the UI element that does whatever you intend to do with the
Invoke
call, and call that wrapper method instead - With the upcoming Silk Test 14 release, you have the option to
DynamicInvoke
arbitrary static methods in you application, which again can be used as a wrapper aroundInvoke
. - Also with Silk Test 14, you'll be able to load custom assemblies and call methods there, so if you don't want to pollute your application with functionality for testing, put that in a custom assembly and load it for your tests.