When do we need Manager.ActiveBrowser.Refresh();

5 posts, 1 answers
  1. VVP
    VVP avatar
    61 posts
    Member since:
    Mar 2015

    Posted 16 Jun 2015 Link to this post

    Hi,

     I saw a lot of Manager.ActiveBrowser.Refresh(); in our company test automation framework.

    Even after clicking on a link  refresh is being done. Doesn't Telerik automatically refresh browser DOM tree. Is it needed after every single click?

    Thanks,

    VVP

  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 19 Jun 2015 Link to this post

    Hello,

    I cannot tell the reason why you are having browser refresh after each step, you can refer to the person who created the test suite. This may be application specific behavior, which I cannot tell. This is not necessary to refresh the DOM since we have separate method for refreshing the DOM, in case needed:

    Manager.ActiveBrowser.RefreshDomTree();

    You can start removing the browser refresh steps and examine the execution. I strongly doubt you will need it after every single click.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. VVP
    VVP avatar
    61 posts
    Member since:
    Mar 2015

    Posted 19 Jun 2015 in reply to Ivaylo Link to this post

    Hi,

    But Browser refresh will actually refresh the browser(equivalent to F5 key) right?

    But refresh DOM tree will only refresh DOM tree hierarchy in object and uesful for test code only right?

  4. Answer
    Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 23 Jun 2015 Link to this post

    Hello,

    Yes you are correct. Browser refresh acts the same way as F5 key.

    RefreshDomTree forces a refresh of the DOM tree from the current document. It is useful for example when you have a partial change in the page (Ajax) which is not reflected in the DOM. 

    Hope this helps.

    Regards,
    Boyan Boev
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  5. VVP
    VVP avatar
    61 posts
    Member since:
    Mar 2015

    Posted 24 Jun 2015 in reply to Boyan Boev Link to this post

    Thanks for the clarification

     

    Thanks,

    VVP

Back to Top