Forum Discussion

amanjain0297's avatar
amanjain0297
New Contributor
10 years ago
Solved

How to handle regular expressions? How to handle a window whose index is changing regularly?

Hi,

 

I would like know how do we handle regular expressions in TestComplete.

I am using Test complete for one of the Windows based  Java application autiomation.

There is a particular window whose index changes everytime it is opened. So this has to be handled using regular expressions.

I tried using regular expressions characters like*,.*,/d and so on, but still it was not working.

Can you please guide me to resolve this issue.

 

Thanks,

Aman.

 

 

6 Replies

  • I am using Test   complete for one of the Windows based Java application autiomation. There is a particular window whose index changes everytime it is opened. So this has to be handled using regular expressions. 

     

     

     


    ________________
    sunny

    • amanjain0297's avatar
      amanjain0297
      New Contributor

      Hi,

       

      Thanks for the reply. We tried the methods specified in the url, still its not working.

      It takes /d or such tokens as characters and is not able to identify.

       

      Thanks,

      Aman.

      • amanjain0297's avatar
        amanjain0297
        New Contributor

        Hi,

         

        The line of code in which we are facing issue is as follows

        Sys.Process("javaw").SwingObject("PendingTradeEditor", "CDS trade #251579 in Pit: CDS Factory", i)

         

        In the above line the last part "i" is  varying every time which has to be regularised.Its value is 0 or above

         

        We used the following method to

        Sys.Process("javaw").SwingObject("PendingTradeEditor", "CDS trade #251579 in Pit: CDS Factory", /d)

         

        We also used .* and [0-9] instead of /d, none of these was successfull.

         

        Could you please let us know how do we proceed?

         

        Thanks,

        Aman.