I'd like to insert a step into my tests to refresh the browser before navigating to the target web page. I thought I could easily do this by using the Simulate User or Simulate Typing functions, but I'm having difficulty doing so. Anyone have any direction for me?
4 Answers, 1 is accepted
0
Hello Richard,
Greetings, Anthony
the Telerik team
There are two ways to do 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.
2. If you prefer to implement a coded step, this line will do the same thing:
ActiveBrowser.Refresh();
Greetings, Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Richard
Top achievements
Rank 1
answered on 09 Mar 2012, 05:16 PM
Anthony,
Thanks for the info. I'm going to reward you with another question ;-)... how about refreshing the browser cache (where I would typically use Ctrl + F5)?
Thanks for the info. I'm going to reward you with another question ;-)... how about refreshing the browser cache (where I would typically use Ctrl + F5)?
0
Accepted
Hello Richard,
Greetings,
Anthony
the Telerik team
See below for the three cache types you can clear. You can also Clear Cookies in a non-coded step.
ActiveBrowser.ClearCache(ArtOfTest.WebAii.Core.BrowserCacheType.Cookies);
ActiveBrowser.ClearCache(ArtOfTest.WebAii.Core.BrowserCacheType.History);
ActiveBrowser.ClearCache(ArtOfTest.WebAii.Core.BrowserCacheType.TempFilesCache);
Greetings,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Richard
Top achievements
Rank 1
answered on 15 Mar 2012, 04:25 PM
Thanks, Anthony! The Browser Refresh and Clear Cache steps in code work great!