Ask a Question

Using regexp in FindAllChildren

SOLVED
jonan
Occasional Contributor

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.

2 REPLIES 2
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)

Hi,

 

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

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: