Forum Discussion

nimishbhuta's avatar
Frequent Contributor
7 years ago

How to use regular expression in EvaluateXpath ?

Hello All, 


I am trying to find different table object inside a frame. In order to find table inside the frame, I am using EvaluateXpath

("//TABLE[@id='jdeGridData.*']" where jdeGridata has different numbers such jdeGridata_01,jdeGridata_02 etc. 


I need to use regular expression for jdeGridData which I tried using jdeGriddata.* but that is not working.Can you please let me know how can it be done. 





2 Replies

  • baxatob's avatar
    Community Hero



    XPath (1.0) does not support regular expressions as well as TestComplete wildcards.

    You can use native XPath syntax instead:



    //table[contains(@id, 'jdeGridData')] 
  • AlexKaras's avatar
    Champion Level 3



    baxatob is correct. This is one of the reasons of why XPath is not recommended approach in TestComplete world.

    Object search and identification provided by TestComplete in 99% of cases is way fasted and more flexible than XPath.

    In your case,


    or, sometimes better

    parent.WaitTable('jdeGridData_*', 10000)

    should work.