How to refresh browser in coded ui test
1 answer
When the web browser is launched, an instance of the object is returned BrowserWindow
. This object BrowserWindow
contains a method Rrefresh
that you can call:
BrowserWindow currentBrowser = BrowserWindow.Launch(new Uri("https://www.google.com/"));
currentBrowser.Refresh();
You can also call the method Locate
to get the instance BrowserWindow
you are using if you need to update elsewhere:
BrowserWindow currentBrowser = BrowserWindow.Locate("title of your browser window");
currentBrowser.Refresh();
+1
source to share