Forum Discussion

srikanth2801's avatar
srikanth2801
Contributor
14 years ago

Regular Expression problem

Hi,



I want to get a frame by title:-(swing object)



iam using JScript.



the title name will be either "Edit - smart bear" or "Edit Title - smart bear" like pattern.



i want to select the frame of any title like those pattern



is there any possibility to get that frame other than regular expression.



if no possibility how can i use the regular expression to get that title.



Please provide me example also for that for frames.



Regards

Srikanth.

3 Replies


  • Hi,





    You can use the Find method to obtain your object. There's no way to use regular expressions for this, you need to use wildcards to make TC ignore the caption's dynamic part.


  • Hi,



    can anybody post an example on how to use the wild card characters for ignoring the dynamic part for the swing frames.



    a small example is enough with syntax is necessary for me as iam a Novice user of  Testcomplete.

  • Hi,





    Something like this:

    ...

    var obj = parentObj.Find("MyProperty", "Static part of MyProperty value*", 10);

    ...






    It translates as "find the first child of parentObj whose MyProperty property starts with 'Static part of MyProperty value' and ends with whatever".