Forum Discussion

Varunawasthi's avatar
Varunawasthi
Occasional Contributor
6 years ago

I am trying to get a property of a object like IsEnabled but not getting it

Hi have a scenario in which in Desktop Application I have to Open an account and for that account by default there are few buttons which I have to check are those Enable or Disable and then for that same account will change View and have to check same buttons are those enable or disable or not.

 

The issue I am encountering is the Object properties is not refreshing.

 

 

Like in default View its Enabled and its True but when I changed its false but its not working for second one its taking same first times properties only.

 

 

what I have used is Sys.refresh, Object.Refresh() both didn't worked wat should I do please guide?

5 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    probably your application takes time to change property.

    But testcompleate is generally faster than applications under test.

    you try waiting some time.  adding delay method or better wait property method

    • Varunawasthi's avatar
      Varunawasthi
      Occasional Contributor

      Hi

       

      Thanks for reply, However I have already put delay of 10s but still its the same issue, any other suggestions ?

       

       

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        If the mapped object is the same, there is a caching of the objects that happens.  Try 

         

        ObjectName.RefreshMappingInfo()