Forum Discussion

jonan's avatar
jonan
Occasional Contributor
8 years ago

Using regexp in FindAllChildren

I want to be able to detect all the objects with the following ClrFullClassName property:

 

DevExpress.XtraEditors.TextEdit

DevExpress.XtraEditors.LookUpEdit

 

If i search for them separately, not using the regexp, TestComplete is able to get it.

But I want my objects to be in just one array so I use regexp so I can get both and store in one array

 

objects = parent.FindAllChildren("ClrFullClassName","regexp: DevExpress\.XtraEditors\.(Text|LookUp)Edit",2)

 

If I use this regexp, i cant get anything.

  • I think I was able to find the solution by using the following expression.

    FindAllChildren("ClrFullClassName","regexp: DevExpress\.XtraEditors\.(Text)|(LookUp)Edit",2)

  • jonan's avatar
    jonan
    Occasional Contributor

    I think I was able to find the solution by using the following expression.

    FindAllChildren("ClrFullClassName","regexp: DevExpress\.XtraEditors\.(Text)|(LookUp)Edit",2)

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      Yes, your second regexp is correct. This is TestComplete's specific.