Forum Discussion

TestingHobo's avatar
TestingHobo
Contributor
8 years ago
Solved

Escaping ? character in FindAllChildren

Anyone know if its possible to use FindAllChildren where the value you are looking for is a ?

I've tried using \? to escape the character but that doesn't work.

 

 

var property = ["WPFControlText", "ClrClassName"];
var value = ["?", "DataGridCell"];
var rowFound = alias.FindAllChildren(property, value, 50).toArray();

 

  • * can be escaped as **, but there's no escape sequence for ?.

     

    You'll need to search by some other value, or manually loop through the objects and compare WPFControlText with "?".

3 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    * can be escaped as **, but there's no escape sequence for ?.

     

    You'll need to search by some other value, or manually loop through the objects and compare WPFControlText with "?".

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    What happens when you try the code that you have here with "?"

    • TestingHobo's avatar
      TestingHobo
      Contributor

      Every dataGrid cell is found and not just the the two with ?

      I've tried using \? but this returns nothing.

      If it's not possible i'll try another way.