Forum Discussion

Ivg's avatar
Occasional Contributor
9 years ago

How To use "Find" Method with multipe properties and values in connected application (C# Code)



I am able to pass single property and value, how to pass multiple properties and values to identify the object?


C# arrays are not supported


Something like this is also not working:


var propNames = "text,Enabled";
var propValues = "Simulate,True";

...["Find"](propNames, propValues, 100, false);



How can I pass array as a parameter?



9 Replies

  • cunderw's avatar
    Community Hero

    Try something like this.


     propNames = new Array ("text","Enabled");
    • Ivg's avatar
      Occasional Contributor

      It's not working, it's not like JScript/C# Script or something like that.


      'Array' in C# is an abstract class

      • Ivg's avatar
        Occasional Contributor

        'PropNames' and 'PropValues' should be of 'var' type.


        When I'm looking at the TestComplete's 'var' type declaration, I can see the supported types 'var' can get in his c'tor.

        There aren't any arrays there.


        Is it impossible to use multiple names & values when writing connected app in C#?