Forum Discussion

Ivg's avatar
Ivg
Occasional Contributor
9 years ago

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

Hi,

 

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?

 

Thanks!

  • cunderw's avatar
    cunderw
    Community Hero

    Try something like this.

     

     propNames = new Array ("text","Enabled");
    • Ivg's avatar
      Ivg
      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
        Ivg
        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#?