Forum Discussion

pradeep_ediga's avatar
pradeep_ediga
Occasional Contributor
2 years ago

How to deal dynamic text in object hierarchy

Hi Team,

 

I have a situation to deal with dynamic text in object hierarchy like the red highlighted number keeps changing in every session. I believe regular expressions might help but I couldn't be able to edit/rename the object in object mapping editor and also tried to rename on the Keyword script directly but end up with error says Expression is invalid so kindly help me how to deal with it.

Aliases.jp2launcher.bufferedframeOracleApplicationsE.extendedframeSalesOrdersRghOu1053.textfieldMainTabPageQty

 

Thanks,

Pradeep

3 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Example of using regexp,

     

    function test1()
    {
        // Example based on https://services.smartbear.com/samples/TestComplete15/smartstore/
        var item = Aliases.articleSports.Panel(0).Link(0).Find("ObjectIdentifier", "regexp:sports_jpg_size_{[0-9]+}");
        Sys.HighlightObject(item);
    }

     

    Or name mapping