Topic
5 replies Latest Post - ‏2013-10-30T12:03:08Z by MrCoolK
ChrisGF
ChrisGF
158 Posts
ACCEPTED ANSWER

Pinned topic Object Name Problem

‏2013-10-29T15:26:35Z |

Hi!

There is a case I can not handle.(I record my script)

My main objects name is constantly changing because in the name is after every release a new number (1434190) and I have to test in all of the comming releases.

I don't no how can I set a value in my table cell because after a new release RFT does not recognise the object since in the new version the number is changed.

I tried this way:

iTable26().click(atCell(atRow(0), atColumn("ColName")), atPoint(78,9));

Base1434190().inputKeys("{Num5}{Num8}{ENTER}");

 

Could you give me a hand?

Thank you,

Chris

Updated on 2013-10-29T15:47:20Z at 2013-10-29T15:47:20Z by ChrisGF
  • MrCoolK
    MrCoolK
    53 Posts
    ACCEPTED ANSWER

    Re: Object Name Problem

    ‏2013-10-29T19:38:51Z  in response to ChrisGF

    the way to do this is to get the property of the object with different form .

    compare what has been changed from before and after and the use regular expression.

    If you can add screenshot of the object with before and after object property  I can help you out.

     

    If anything is constantly changing another way to do is use the dynamic object find method and get the object

    Thanks

    Cool K

     

    • ChrisGF
      ChrisGF
      158 Posts
      ACCEPTED ANSWER

      Re: Object Name Problem

      ‏2013-10-30T06:54:27Z  in response to MrCoolK

      Hi!

      Thank you!

      I tried to add Regexp but did not work well. Maybe I did something wrong?

      Please check the attachment.

      Kind regards,

      K

      Attachments

      • ChrisGF
        ChrisGF
        158 Posts
        ACCEPTED ANSWER

        Re: Object Name Problem

        ‏2013-10-30T07:29:30Z  in response to ChrisGF

        I used also a regexp matcher and for me the matching text with regexp would be:

        "Grundbuch Führung - Version[ ][0-9\\.]+[ ]Test"

        I inserted in the object map in the .captionText and in the .accessibleContext.accessibleName  

        after that I changed the weight of the properties and it works!!! Notice that I even added the empty [ ]regext with a space inside....

        So thank you. It works now...

        Have a nice day 

         

        Attachments

        • Jiri_Mundl
          Jiri_Mundl
          16 Posts
          ACCEPTED ANSWER

          Re: Object Name Problem

          ‏2013-10-30T07:51:56Z  in response to ChrisGF

          I think that better is use Regular Expression from pop-up menu on the given attribute in Test Object  Map.

           

          Best Regards, Jiri

        • This reply was deleted by ChrisGF 2013-10-30T11:18:37Z.
      • MrCoolK
        MrCoolK
        53 Posts
        ACCEPTED ANSWER

        Re: Object Name Problem

        ‏2013-10-30T12:03:08Z  in response to ChrisGF

        Glad to know it worked.

        Ill also suggest you to do some research in the find method.

        Find method are really helpful in this kind of scenario.

        For example you say find text box.

        It will give all the text box in the screen then you say if object returned matched the property I need  then click the object.

        Anyways I am glad my suggestion helped you and you where able to solve your problem.

        Thanks

        Cool k