Force Browser Refresh

5 posts, 1 answers
  1. Nigel
    Nigel avatar
    53 posts
    Member since:
    Jan 2012

    Posted 22 Feb 2012 Link to this post

    Hi,

    Is there a simple way to force a Browser refresh?  I tried re-navigating to my URL but that didn't do the trick.  Is there a way I can send a shortcut command to the browser, something like Ctrl-F5?  (I understand that shortcuts on one browser won't work with another, but I'm just interested in IE at the moment.)

    Thanks,
    Nigel Edwards, Transition Computing.
  2. Answer
    Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 Feb 2012 Link to this post

    Hello Nigel,

    There are actually two fairly simple things you can do to accomplish a browser refresh and not rely on keystrokes:

    1) During recording, if you click on the Refresh button, Test Studio will record a "Browser Refresh" test step. This will then refresh the browser no matter which browser you use to run your test in.

    2) If you prefer to implement a coded step, this one line of code will do the same thing:
    ActiveBrowser.Refresh();

    Regards,
    Cody
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Nigel
    Nigel avatar
    53 posts
    Member since:
    Jan 2012

    Posted 23 Feb 2012 Link to this post

    Excellent, many thanks Cody. :)
  4. Deowrat
    Deowrat avatar
    1 posts
    Member since:
    Mar 2015

    Posted 17 Mar 2015 Link to this post

    Hello Everyone...

    I want to achieve such browser refresh in my Silverlight Vb Project.
    But whn i try to add required dlls to my silverlight project,error occurs that "those dlls are not built against silverlight".

    so anybody can tell me how to add 
    ActiveBrowser.Refresh() in my Silverlight xaml.vb file..

    Thanks in advance


  5. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 17 Mar 2015 Link to this post

    Hi Deowrat,

    I am sorry but ActiveBrowser.Refresh() cannot be used in Silverlight xaml.vb file. It can only be used in a Telerik Testing Framework coded unit test.


    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top