Learn to use Visual Studio, Visual Studio Online, Application Insights and Team Foundation Server to decrease rework, increase transparency into your application and increase the rate at which you can ship high quality software throughout the application lifecycle
More videos »
Coded UI Tests help automate browser based applications built on Internet Explorer. We are now enabling cross-browser testing of such applications. Users will be able to perform functional testing of web applications across IE/Firefox/Chrome. One can use IE to record tests and validate control properties using Coded UI Test Builder. Users also have an option to hand code cross browser tests. If user needs to playback on IE, she can click on Run All in Test Explorer which plays back the recording using Coded UI inbuilt IE Plugin. On the other hand, if the user needs to playback on non-IE browser, she can set BrowserWindow.CurrentBrowser as “firefox” or “chrome” in the test depending on which browser she wants to test before running from the test explorer. In this case, Coded UI Engine communicates with Selenium Web Driver to execute the playback.
Hope you like this feature. Feel free to drop your feedback here
The following features are available across the various web browsers:
Record on IE and Playback everywhere
Author cross browser tests with Coded UI Test Builder
Author cross browser tests using plain hand coding without UI Map
Run cross browser tests sequentially on multiple browsers
Troubleshoot cross browser test failures
Enable HTML Logger - follow http://msdn.microsoft.com/en-us/library/jj159363.aspx
Please fill in the survey to register your feedback on this feature: https://s.zoomerang.com/s/CrossBrowserTesting. Your feedback will help us plan for further enhancement to the cross browser feature.
I have a different situation here. My application supports only Google Chrome , dev team developed this application like that and will not able to open in any other browsers. Now I am looking to automate this application. I tried to identify the objects through Coded UI test builder and I could see same properties for all controls. Even I tried to record and play back with Chrome. When I recorded all controls have been created with control type as “Document”. Is there a way to automate an application which supports only Chrome either hand coded or record and play back? Please suggest me..
@infovenu: You would not be able to record on Chrome as recording support for this feature is available only for the above mentioned versions of IE. Hence, Coded UI Test Builder does not work fine on other browsers. However, if you want to hand code on Chrome, you can use the Chrome Developer Tools (can be accessed by F12) to inspect properties of controls. You can then use these properties to add Search Properties in your code.
The link provided for feedback survey seems to be dead. I am getting Page not found error (Http 400 Bad Request).
I'm trying to run Codedui tests in chrome. Here is the code i'm using:
BrowserWindow.CurrentBrowser = "chrome";
var browser = BrowserWindow.Launch(new Uri("http://msdn.com"));
But i'm getting exception: "The browser chrome is currently not supported".
I have VS2012 Ultimate and 'Selenium components for Coded UI Cross Browser Testing' installed.
Am I doing something wrong or is there smthing i need to check?
I did following:
- installed VS 2012 premium, vsupdate_KB2707250.exe and CodedUITestCrossBrowserSetup.msi on Server 2012 . - downloaded chrome driver and selenium dot net bindings, unzipped these files and copied to folder as specified.
- created new Coded UI project and recorded several actions in IE 10.
- Run test on IE (it was executed successfully).
- Added BrowserWindow.CurrentBrowser = “firefox”; and run the test - test was failed with error:
Unable to find browser window with 'Security Settings at Risk' in the title.
Result StackTrace: at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserFactory.Locate(PropertyExpressionCollection searchProperties, PropertyExpressionCollection filterProperties)
The same is for Chrome. Please help me with this issue.
I cannot hear the recordings. What do I need to download to listen?
Will this feature work without CTP update, by just installing Selenium components on VSTS 2010 Ultimate RTM.
Or it is mandatory to install the CTP update for this to run on chrome?
The problem is the window title. When the framework is search for the browser window to play back in it starts by looking at the window title which is added as a property when you recorded this. I had some issues with this but it's easily soved. Go to the .uitest file and edit the window title to match what is actually showing.
Likely, when you recorded on IE some security settings were upsetting IE so it displayed that on the title but when you play back in Chrome it does not complain but shows the correct title but now the framework is looking for the title with the security warning, not the correct one.
Hope that helps
@Peter: Thanks for the solution that you suggested. I hope it helps solve Alexy_R's problem. We are planning to add smart match for changing window titles in the next release. Hopefully, it will ease the problem
@Alexy_R: You do not need to download Selenium separately. The installer that you download from Visual Studio Gallery visualstudiogallery.msdn.microsoft.com/.../CodedUITestCrossBrowserSetup.msi should install all required components for you
Also, in case the solution suggested by Peter does not work, write to us with problem description and HTML Logs as well as UITestLogs at shubhram at microsoft dot com
I have a problem getting this to run on Firefox. It works fine on IE and Chrome but when I try Firefox I get the following:
Test method Med3K.Framework.WebFramework.Sanity.Smoke threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: No response from server for url http://localhost:7055/hub/session/b0d7759e-4327-479e-a787-0885dfa6bae9/element/%7B4ade158a-2728-4140-9693-9f6eb79182d1%7D/displayed
and I have no idea what is wrong. I'm using Firefox 17.0 and Chrome 23.0 using scripts recorded on IE9. I'm running VS2012 Premium with the latest updates and everything installed as described above.
The curious thing is that it doesn't fail immediately, the script starts up, launched Firefox, logs in to the application but then when it tries to interact with the webpage nothing happens for 2 minutes and then I get this failure message.
Does the page take a really long time to load? After the login step, if you catch the UITestException and try to move ahead does that work? If that does not, write to us with problem description and HTML Logs as well as UITestLogs at shubhram at microsoft dot com. (Or skhan at microsoft dot com)
Coded UI test work only in IE!!!WTF why visual studio can't find controls and class of elements in firefox and chrome? My environment VS 2012 premium, vsupdate_KB2707250.exe
There isn't any audio associated with these videos.
Awesome article Shubhra, and thanks for Chrome & Firefox playback testing, do you know you guys will support Safari? :)
Currently , My team is embedded in TFS 2010. Is it possible for this. Does this Patch will work in TSF 2010.