This is a migrated thread and some comments may be shown as answers.

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

4 Answers 151 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
VVP
Top achievements
Rank 2
VVP asked on 16 Jun 2015, 12:00 PM

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

4 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 19 Jun 2015, 06:44 AM
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!
0
VVP
Top achievements
Rank 2
answered on 19 Jun 2015, 06:57 AM

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?

1
Accepted
Boyan Boev
Telerik team
answered on 23 Jun 2015, 02:35 PM
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!
0
VVP
Top achievements
Rank 2
answered on 24 Jun 2015, 09:55 AM

Thanks for the clarification

 

Thanks,

VVP

Tags
General Discussions
Asked by
VVP
Top achievements
Rank 2
Answers by
Ivaylo
Telerik team
VVP
Top achievements
Rank 2
Boyan Boev
Telerik team
Share this question
or