You really might want to point folks to a sample or two about making use of this functionality. Without some kind of working example that customers can work with, it's really not going to gain any traction.
For those curious about being able to swap between browsers at will, it turns out you need to set an environment variable in order to do that. I found some now out-of-date material at http://msdn.microsoft.com/en-us/library/jj835758.aspx that has a bit of detail on that.
Overall, this is an improvement over being able to run only on IE, but the amount of work that is needed to do so can be time consuming. For example - if you have anything dynamic on your pages (say, part of the window title changes based on a previous action), you're not going to have a great deal of luck using this.
Also, having to code your own "WaitForAjax" solution is a big hurdle to clear.
Based on what I see so far, my team will be staying with our current Selenium WebDriver framework. We have more control over flow, control detection and selection, and dynamic content handling than CUI has.
Have this working with IE, FireFox, and Chrome browsers on a product using a javascript framework. Depending on your application you might need to spend some time creating a good set of search criteria that gives good performance and reliably finds objects across browsers, in my case many of my properties were dynamic across different builds, sessions, and browser because of the javascript framework being used, but we got it working with some experimentation.
Install wouldn't work on my Machine - claimed I didn't have Visual Studio 2012 installed but I have legit Ultimate 2012 + the update running. Had to use manual steps.
A test case running on Chrome with CodedUI was running completely fine until recently it suddenly started failing due to this exception:
isDisplayed execution failed;
Element does not exist in cache
There were no changes to the SUT. Anyone else experiencing this issue?
We have been using this successfully with Firefox 18. Recently upgraded a couple of development boxes to Firefox 20.0.1 and discovered that test automation does not work with the newer version of Firefox. The browser starts but nothing plays back. Eventually, the test fails and reports a timeout trying to connect a socket. Is this a known issue? Any idea on when it will be supported?
I am trying to implement the cross browser automation test, I am getting following error
Test Name: CodedUITestMethod1
Test FullName: CodedUITestProject6.CodedUITest1.CodedUITestMethod1
Test Source: c:\Users\s.asharam.tiwari\Desktop\CMS Testing\CodedUITestProject6\CodedUITestProject6\CodedUITest1.cs : line 27
Test Outcome: Failed
Test Duration: 0:00:00.4188217
Result Message:
Test method CodedUITestProject6.CodedUITest1.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: The playback engine could not find Selenium binaries on your system. You need to install both the Selenium .NET bindings and Selenium Chrome driver to run cross browser coded UI tests. For more information about installing the binaries, see http://go.microsoft.com/fwlink/?LinkID=267598
Result StackTrace:
at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserFactory.GetBrowserSupportLevel(String browserName)
at Microsoft.VisualStudio.TestTools.UITest.Framework.BrowserPluginManager.GetBrowserFactoryByName(String browserName)
at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.SetCurrentBrowserWindowPrivate(String value)
at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.<>c__DisplayClass46.<set_CurrentBrowser>b__45()
at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.set_CurrentBrowser(String value)
at CodedUITestProject6.CodedUITest1.CodedUITestMethod1() in c:\Users\s.asharam.tiwari\Desktop\CMS Testing\CodedUITestProject6\CodedUITestProject6\CodedUITest1.cs:line 30
Regards
-Sarvesh
In one of my test I need to get the parent/container of the selected element. I tried using both Container property and GetParent method.
Each of the browser work differently :(
1. IE - Returns the parent object of the selected element.
2. Chrome and FF: Are returning the window object.
Any help on this? Is there a way in which I can get the actual parent instead of the window object for FF and Chrome?
Thanks Saima. I tried this again and it seems to be working fine :)
Only thing that has changed is my browser version for firefox and chrome. Not sure if that was causing the issue.
Thanks a lot.
I have the following installed in my machine
1. OS - WIN 7 64 bit
2. VS 2012 premium
3. VS 2012 update 2 CTP4 (http://www.microsoft.com/en-us/download/details.aspx?id=36833)
4. Installed chrome driver and selenium dot net bindings from http://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d
5. Have Chrome browser - Version 25.0.1364.160 m
and FF 19.0.2 in my machine
5. Still getting expception
Result Message:
Test method RecordAndPlayback.CodedUITest1.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: The playback engine could not find the Selenium binaries required to run cross browser coded UI tests. This may be because the Selenium .NET bindings and Selenium Chrome driver are not installed or an older version of the Selenium Components Installer was used. For more information about installing the binaries, see http://go.microsoft.com/fwlink/?LinkID=267598
Result StackTrace:
at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserFactory.GetBrowserSupportLevel(String browserName)
at Microsoft.VisualStudio.TestTools.UITest.Framework.BrowserPluginManager.GetBrowserFactoryByName(String browserName)
at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.SetCurrentBrowserWindowPrivate(String value)
at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.<>c__DisplayClass46.<set_CurrentBrowser>b__45()
at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.set_CurrentBrowser(String value)
at RecordAndPlayback.CodedUITest1.CodedUITestMethod1() in d:\MyProjects\RecordAndPlayback\RecordAndPlayback\CodedUITest1.cs:line 29
selenium dot net binding i installed version
selenium-dotnet-2.31.2.zip instead of selenium-dotnet-2.29.1.zip
from https://code.google.com/p/selenium/downloads/list
I reinstalled all components as per instructions in http://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d
installed vs 2012 update 2 CTP 4 (VS2012.2 CTP.exe)
from http://www.microsoft.com/en-us/download/details.aspx?id=36833
Launched vs 2012 and tried to record and playback using coded UI Test builder and it's broken. I see message saying "Coded UI Test Builder has stopped working". Also test which was working with update1 is not working after installing update2 and i see exception
System.MissingMethodException: Method not found: 'Boolean Microsoft.VisualStudio.TestTools.UITest.Extension.UITestUtilities.get_IsIE10OrHigher()'.
I installed VS2012.2 CTP.exe from
http://www.microsoft.com/en-us/download/details.aspx?id=36833.
Do i need to install other files in this page http://www.microsoft.com/en-us/download/details.aspx?id=36833 to implement cross browser testing?
@Sharaf123: Did your update-2 CTP-4 installation complete successfully? This could probably be because you have some stale dll's which have not been updated. Were you prompted for a reboot after installation?
If you see the Chrome first time launch dialog [Chrome is almost ready], you basically need to use your default profile for chrome to proceed with tests.
Have a look here http://blogs.msdn.com/b/visualstudioalm/archive/2013/02/21/handling-browser-profile-issues-while-doing-cross-browser-testing-with-coded-ui-test.aspx
Basically, create an environment variable ChromeProfileDirectory and set the value to the location to your default profile, (generally under C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default.)
[Above applies to Visual Studio Update 2]
I seem to have everything installed properly but still getting an error.
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: The playback engine could not find Selenium binaries on your system. You need to install both the Selenium .NET bindings and Selenium Chrome driver to run cross browser coded UI tests.
>Using VS2013 Ultimate 11.0.51106.01 Update 1
>d/l and ran CodedUITestCrossBrowserSetup.msi
>chromedriver comes up manually using version 26.0.1383.0
>copied SeleniumDotNET files to "C:\Program Files (x86)\Common Files\microsoft shared\VSTT\Cross Browser Selenium Components"
Looked at all the docs I could find. Is there something I am missing?
Hi,
I have updated my VS Ultimate 2012 til Update 2 CTP and installed this Selenium components. But I got exceptions when I tried to launch the browser in my CodedUI test for Firefox v19 and Chrome v22:
Firefox: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: Failed to start up socket within 45000
Chrome: Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date
I also can not find any selenium components under this folder :
C:\Program Files (x86)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages
Does it mean that I dont have the plugin installed correctly?
Just tried older version of Chrome(24.0.1312.57), now it works! The test can open the web page I want in Chrome. I guess there are some mismatching versions issues between web browser and what this selenium plugin can support.
Hi,
I'm having an issue when attempting to perform a cross-browser coded UI test in Visual Studio 2012 Update 1... I've installed the Selenium components per the instructions, but it keeps throwing the following error:
" Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: The playback engine could not find Selenium binaries on your system. You need to install both the Selenium .NET bindings and Selenium Chrome driver to run cross browser coded UI tests. For more information about installing the binaries, see http://go.microsoft.com/fwlink/?LinkID=267598"
I've checked the NuGet Package Manager and it looks like the Selenium web driver has been added to my CodedUI test project... Any help would be much appreciated.
Thanks!
Hi Michael,
The current version of Selenium installer (updated on 2/22/2013) works for VS 2012 Update 2 CTP3 onwards (you seem to have Update 1) . I would highly recommend installing this update as new functionality is enabled for cross-browser testing using Coded UI.
Thanks !