Instead of adding the same user code function multiple times with different variables, is it possible to pass a single array argument into the function (string, int) since Ranorex default argument in the Recording UI does not have array as an argument type option.
For example, I have a validation function that validate whether multiple strings of data exist on the page. Currently I'm having to repeat the validation step twice to check two different string.
Validate_String(string var);
Wondering if there's any way to do something like :
Validate_String(string[] var);
Thanks!!
Eugene
Passing Array as UserCode Argument
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Passing Array as UserCode Argument
Hello Eugene,
Following data types are available for recording variables: Unfortunately, it’s not possible to use an array as an argument for UserCode methods, which should be addressable from recordings.
I would suggest passing the strings separately to your method. For example:
Robert
Following data types are available for recording variables: Unfortunately, it’s not possible to use an array as an argument for UserCode methods, which should be addressable from recordings.
I would suggest passing the strings separately to your method. For example:
public void MyUserCodeMethod(string argument1, string argument2) { }Regards,
Robert