Ask a Question

How to deal dynamic text in object hierarchy

pradeep_ediga
Occasional Contributor

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 3
rraghvani
Super Contributor

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

rraghvani_0-1664275052907.png

 

pradeep_ediga
Occasional Contributor

Hello, Thank you so much for your response. I am not dealing with the web objects in my project and moreover my application deals with java applets so below is how objects being captured in which the objects cannot be edited in NameMapping editor. Can you please suggest any other way?

pradeep_ediga_0-1664293615818.png
Thanks,

Pradeep

 

Hi Pradeep,

 

Try to use wildcard: https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html#InNameMapping

 

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: