It is very small action but if you are new with CodedUI and struggling to take off (Opening and Closing the browser) with CodedUI then this post could help you…
To start browser and your application you can use below line of code-
BrowserWindow browser = BrowserWindow.Launch(new System.Uri(“http://www.google.com”));
Above code will start you browser.
browser.close(); //it will close your browser.
If you have switched to new window and now if you wanted to close only that window then use below code sample-
BrowserWindow newwindow = new BrowserWindow();
Hope it will help…