Selenium components for Coded UI Cross Browser Testing

Free

Selenium components for Coded UI Cross Browser Testing

(4) Review
Visual Studio
2012
Download (3,775)
5/20/2013
1.2
E-mail Twitter del.icio.us Digg Facebook
Add To Favorites
Description
Reviews (4)
Q and A (17)
Sign in to Write a Review
Sort By:

by JoeH250 | April 30 2013

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.

by Mario Saccoia - MSP | January 24 2013

Fantastic tool!!!

by Marc Velasco | January 10 2013

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.

by Nathan.Grant | November 30 2012

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.

Sign in to Start a Discussion


  • VS2012 with Update 2 - Cross Browser Testing with Chrome Issues
    1 Posts | Last Post Tue 11:47 AM
    • I am currently implementing cross browser testing for our application and have come across with an issue for Chrome 26.0.1410.64 m (including some older versions). When i run a CUIT, Chrome is launched and then remains idle with no sign of life, a minute later the CUIT fails.
      
      I had tried installing earlier version of Chrome to see if that helps, but it still didn't do the trick. I had somewhat similar experience initially with latest version of Firefox 20+ but installing Firefox 17.0.1 has resolved this issue.
      
      I have followed all instructions with regards to ensuring visual studio and the environment supports cross browser testing.
      
      - Installed VS 2012 Update 2 (I did not have Update 1 before)
      
      Microsoft Visual Studio Ultimate 2012
      Version 11.0.60315.01 Update 2
      Microsoft .NET Framework
      Version 4.5.50709
      
      - Installed Selenium components for Coded UI Cross Browser Testing
      
      This is the Error I am currently getting:
      
      Started ChromeDriver
      port=20863
      version=26.0.1383.0
      log=C:\IntuitiveSearchTechnologies\Qa\CodedUiTests\TestResults\Admin_ADMIN-PC 20
      13-05-21 12_27_23\Out\chromedriver.log
      [3836:3696:0521/122728:ERROR:gpu_info_collector_win.cc(96)] Can't retrieve a val
      id WinSAT assessment.
      [3836:3696:0521/122728:ERROR:child_process_launcher.cc(294)] Failed to launch ch
      ild process
      [3836:3696:0521/122733:ERROR:textfield.h(156)] NOT IMPLEMENTED
      
      Result Message:	
      
      Test method Qa.CodedUiTests.Merchant.CodedUITests.LoginWithoutInputingDataMerchant threw exception: 
      Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: No response from server for url http://localhost:4584/session/095a4c4d4fed48cc1d20df5527fd22e3/title
  • Close the chrome driver after each test
    4 Posts | Last Post May 13, 2013
    • Hi:
      
      Currently the chrome driver gets opened up for each test case. Is there any way to close the driver after test execution
    • Hi Ajo,
      The chromedriver.exe windows should ideally close after each test is run. Which VS Update are you currently on?
    • Update 1. The chrome driver open up for each test case.
    • Issue fix:
      The files are manually copied to the folder (MSI installation failed. So, add chrome driver path to system path variable.
      
  • StaleElementReferenceException
    2 Posts | Last Post May 02, 2013
    • 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?
    • Hi aletiro,
      Was there a chrome update? And what scenario brings up this exception? 
  • Firefox 20.0.1 not supported
    2 Posts | Last Post May 02, 2013
    • 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?
    • Hi Tom,
      Yes this is a known issue. Update 3 is your solution here.
  • The playback engine could not find Selenium binaries on system
    2 Posts | Last Post April 09, 2013
    • 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
      
    • I have update vsts2012 to update-2 and it resolved my issue.
  • Parent Object
    4 Posts | Last Post April 04, 2013
    • 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?
    • Any one facing the same issue?
    • Hi Utkarsh,
      
      I tried getting the parent of elements, and it seems to get the correct parent. Is it a specific scenario which does not work for you?
    • 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.
  • Coded UI cross browser not working - Unable to launch Chrome and FF
    7 Posts | Last Post March 25, 2013
    • 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 the add-ons including VS2012 Update 2 CTP and it is now working for me.
    • Thanks for the reply master468!!! 
    • 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?
  • Running Cross Browser on chrome - How to fix the initial chrome browser dialog which comes up (answered here)
    2 Posts | Last Post March 13, 2013
    • 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]
    • EDIT: 
      ChromeProfileDirectory=C:\Users\<username>\AppData\Local\Google\Chrome\User Data will work.
      
  • Error when trying to use Chrome
    1 Posts | Last Post March 11, 2013
    • 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?
  • CodedUI test can not run in Firefox and Chrome
    3 Posts | Last Post February 28, 2013
    • 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?
    • Have written wrong. Chrome version is 25.0.1364.97 m.
      
      I can see the browser opens a blank page but it does not take the URI
    • 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.
1 - 10 of 17 Items