Selenium components for Coded UI Cross Browser Testing


Selenium components for Coded UI Cross Browser Testing

(7) Review
Visual Studio
2013, 2012
Download (17,244)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (7)
Q and A (83)
Sign in to write a review
Sort by:

by Jian_H | December 23 2013

by tiny apps | October 31 2013

Hi this seems to be a nice replacement for the Feature pack2 back in Vs2010 which just support Firefox 3.6 but this is great start to playback CUIT stuff against WebDrive whihc i think eliminates the burning issues open Desktop session

by Oleg Pantsjoha | May 24 2013

Great add on to Coded UI Testing framework, but unfortunately it seems there are still a lot of issues surrounding it, and lack of support is not helping. Some issue and confusion I've spotted from other users while browsing for solutions with my own issues is with simple installation of the product. Additionally, the version support for different browser is all over the place. I understand that it is also down to individual browser suppliers but i believe issue like those should be dealt prior to release of any product. Overall still a great add on, just requires attention to above issue in order to get 5 stars from users. Looking forward to next update.

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 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.

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

  • Crome Brower testing error - you are using unsupported command line flag
    2 Posts | Last post 10:12 AM
    • We are testing Chrome 36 using Coded UI Tests.  When chrome launches with
      BrowserWindow.CurrentBrowser = "chrome";
      BrowserWindow win = BrowserWindow.Launch("http://testsite");
      This message appears: 'you are using an unsupported command line flag --ignore-certificate-errors. Security and stability will suffer'
      This post describes the same issue we are seeing:
      This chromedriver issue thread ( describes passing the "test-type" parameter to ChromeOptions class before initializing chromedriver.exe.  We see that with the following approach(using OpenQA.Selenium.Chrome) when Chrome is launched, the 'unsupported command line flag' message does not appear:
      ChromeOptions options = new ChromeOptions();
      ChromeDriver chromeDriver = new ChromeDriver(@"C:\Program Files (x86)\Common Files\microsoft shared\VSTT\Cross Browser Selenium Components\", options);
      Is it possible to pass the "test-type" Argument before chromedriver.exe is initialized through BrowserWindow.Launch?
    • No its not supported. you can only give command line arguments that can be passed to the browser.
  • Some functionality is broken after upgrading Chrome to ver. 36
    2 Posts | Last post Mon 7:48 PM
    • Hi,
      Don't know where to open bug, so I'll report it here:
      After upgrading chrome to version, our CodedUI tests stopped working.
      Here is the error message reported by Selenium Component:
      Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details: 
      TechnologyName:  'MSAA'
      ControlType:  'Document'
       ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
      The same code works perfectly with IE8/8/10, Firefox (all versions) and Chrome
      I still can get my code working by:
      1. Setting EqtTraceLevel to 0 (currently it is 4) in application configuration file.
      2. Avoid accessing BoundingRectangle property of UITestControl (it always fails with the above message on Chrome 36 for every control).
      But this would break many of our tests.
      Any help would be appreciated.
    • Hi Igor,
      Can you try performing a browser refresh before accessing these properties. This is a known issue and we are working on it.
      - Abhitej.
  • stale element reference: element is not attached to the page document error is coming when i try to debug in chrome browser
    2 Posts | Last post Thu 8:50 PM
    • I am using Visual Studio 2013
      I have installed selenium components for cross browser testing
      I am Running the script in Chrome Browser
      When I Run the script it is working Fine
      But when i try to Debug the script, When execution comes to the line which executes javascript in browser - below error is displaying.
      Below is the java script line where  Error is coming
      string text = "$('.cell-link').each( function(){ if($(this).text() === '" + testName + "') $(this).parent().parent().parent().trigger('click'); });";
      bw.ExecuteScript(text, "javascript");
      testname is some variable which takes string as input
      "stale element reference: element is not attached to the page document\n  (Session info: chrome=35.0.1916.153)\n  (Driver info: chromedriver=2.8.241075,platform=Windows NT 6.1 SP1 x86_64)"
    • Apologies for the delay in response siddhu. Can I ask what you are debugging through? Are you saying the Coded UI Test playback fails when you instead of running, debug the test? 
  • Installation failed in Windows 8 x64. ..
    8 Posts | Last post July 14, 2014
    • I am having VS 2012 Premium installed on Windows 8.1, 64 bit. When try to install the CodedUITestCrossBrowserSetup it is displaying the following message. Can you help in resolving this issue?
      Error message as follows
      To install Microsoft Cross browser testing setup for selenium components, you must have one of the following Visual Studio 2012 or Visual Studio 2013 SKU installed on your computer; Ultimate, Premium, Test Professional, Test Agent, Test Controller, Team Foundation Server.
    • Hi KishoreRavi
      Can you confirm what version of VS 2012 you are on. As mentioned in the Description of the plgin-
      Supported versions
      This installer works with VS 2012 Update 4 as well as VS 2013.
      Please go to VS-> Help -> About and confirm whether you are on RTM or an older Update. In case you are, we recommend moving to Update4 and using the plugin.
    • Hi Srishti,
      Windows 8.1, 64 bit
      Microsoft Visual Studio Premium 2012
      Version 11.0.61030.00 Update 4
      Microsoft .NET Framework
      Version 4.5.51641
      Installed Version: Premium
      When I install the plugin still I get the same error message. 
    • Hi Rubinis,
      Are any other VS versions installed on this machine? Also, can you confirm if you have the following registry entry: HKLM\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vs\Servicing\12.0\Premium\. If yes, can you please tell us the value of Version under this node.
    • Hi Abhitej
      Yes I have other VS(VS2010) installed on my machine. When I checked the registry I see up to this HKLM\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vs\Servicing
      Under servicing, I do not have 12.0. I have 10.0, 11.0, 9.0
    • Thank you for the response Rubinis
      Could you please check under the 11.0 node of the same registry path shared by Abhitej and let me know what the value is. Also, have you tried it out on a machine with only VS 2012 Update 4 (no VS 2010 installed)? Does it work there?
    • Hi Srishti,
      I checked the version under HKLM\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vs\Servicing\11.0\premimum
      version 11.0.50727
      Updated Version 11.0.61030
    • Hi
      I tried at my end VS2012 and VS2010 on one machine doesn't seem to be the issue.
      Can you please enable installer logs as shown here :- 
      and share the same with us so we can see if there are any issues.
  • System.NotSupportedException: GetProperty of "HasFocus" is not supported on control type: Window
    3 Posts | Last post July 07, 2014
    • Hi,
      I wrote this code in VS 2013 for coded ui test. and getting "System.NotSupportedException: GetProperty of "HasFocus" is not supported on control type: Window" error message when i am running this code in Firefox(running AMRTOnetimeyearIE7ClintErrFF() which is calling AMRTOnetimeyearIE7ClintErr() after opening Firefox ) while in Internet Explorer (for IE AMRTOnetimeyearIE7ClintErr()) it is working fine.
      [DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase",";Microsoft .Net", "186", DataAccessMethod.Sequential), TestMethod]
              public void AMRTOnetimeyearIE7ClintErr()
                  Action<test.Web.Testing.Utility> testGroup = util =>
                      Assertions assert = new Assertions(TestContext);
                      //Grabbing all values from test case manager into dr.
                      DataRow dr = TestContext.DataRow;
                      #region Variable Declarations
                      HtmlEdit uIAddingEdit = this.AmortUIMap.UIAmortizationScheduleWindow.UIAmortizationScheduleDocument8.UIAddingEdit;
                      HtmlDiv uIPayOffDatePane = this.AmortUIMap.UIAmortizationScheduleWindow.UIAmortizationScheduleDocument8.UIPayOffDatePane;
                      HtmlEdit uIOneTimeAdditionalPayEdit = this.AmortUIMap.UIAmortizationScheduleWindow.UIAmortizationScheduleDocument8.UIOneTimeAdditionalPayEdit;
                      HtmlSpan uIMayPane = this.AmortUIMap.UIAmortizationScheduleWindow.UIAmortizationScheduleDocument8.UIMayPane;
                      HtmlButton uIShowRecalculateAmortButton = this.AmortUIMap.UIAmortizationScheduleWindow.UIAmortizationScheduleDocument8.UIShowRecalculateAmortButton;
                      HtmlDiv uISinglepaymentmustbemPane = this.AmortUIMap.UIAmortizationScheduleWindow7.UIAmortizationScheduleDocument.UIErrorMsgPane.UISinglepaymentmustbemPane;
    • I was unable to post whole code at once so remaining code is as follows
       ClickShowAmortTableParams AddOneTimeTbVal = this.AmortUIMap.ClickShowAmortTableParams;
                      //Pulling values from test cases manager and assining it to variables.
                      AddOneTimeTbVal.UIAddingEditText = Common.GetParamValue(dr, "OneTimePayment", "1200");
                      string oneTimeDate = Common.GetParamValue(dr, "oneTimePaymentDate", "May 2014");
                      //Method to on "Recalculate" button.
                      util.RunTestStep("ClickAmortizationButton", "Click on show amortization button", () => this.AmortUIMap.ClickShowAmortTable(), 5000);
                      //Assertion to verify if mortgage start date and one time payment month are sae then it will display error message.
                      assert.AreEqual("*Single payment must be made at least a month after loan start date.", uISinglepaymentmustbemPane.InnerText);
              [DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", ";Microsoft .Net", "141", DataAccessMethod.Sequential), TestMethod]
              public void AMRTOnetimeyearIE7ClintErrFF()
                  BrowserWindow.CurrentBrowser = "Firefox";
    • Hi Neeraj
      I cant say based on the code you have shared as none of the search logic is mentioned here. Exactly what line of builder generated code are you hitting this issue in? Or are you explicitly trying to get the focus on the window?
  • Test fails on non-IE browsers
    8 Posts | Last post July 01, 2014
    • Below is the code which i am using for clicking on perticular link on page, which works fine with IE but non-IE browsers. I posted this query in developers forum but they told me its selenium component/cross browser limitation etc and to check with you guyz. So, could you please look into it.
      public void ClickOnLink(string browserName, string docFriendlyName, div FriendlyName, string linkInnerText)
                  BrowserWindow browser = new BrowserWindow();
                  browser.TechnologyName = "MSAA";
                  browser.SearchProperties.Add("Name", browserName, PropertyExpressionOperator.Contains);
                  HtmlDocument hDoc = new HtmlDocument(browser);
                  hDoc.TechnologyName = "Web";
                  hDoc.SearchProperties.Add("FriendlyName", docFriendlyName,               PropertyExpressionOperator.Contains);
                  HtmlDiv hDiv = new HtmlDiv(hDoc);
                  hDiv.TechnologyName = "Web";
                  hDiv.SearchProperties.Add("FriendlyName", divFriendlyName,               PropertyExpressionOperator.Contains);
                  HtmlHyperlink hLink = new HtmlHyperlink(hDiv);
                  hLink.TechnologyName = "Web";
                  hLink.SearchProperties.Add("InnerText", linkInnerText, PropertyExpressionOperator.Contains);
                  if (hLink.Exists)
                      //Wait till browser finishes loading
                      Assert.Fail("Given link doesnt exists in given page.");
    • Hi Vijay,
      You can pass in the BrowserWindow variable into this function instead of having to recreate it here again or you can use BrowserWindow.Locate() with the title.
      - Abhitej.
    • Hi Abhijit,
      Yes, I will use BrowserWindow.Locate() with title. I wasnt aware of that, i am new to Coded UI. Thanks.
      Bdw could you please modified above method as per your understanding so that it will run on non-IE browsers as well?
    • Hi Abhijeet, Vijay has given the above code which is working fine on IE but getting failed on chrome and firefox.
      This is common code you too use on any webpage to click a link.
      Will you please try @ your end if its working for you on firefox and chrome ? and let us know the changes if any 
    • As Abhitej mentioned - you cannot create a new BrowserWindow variable in this function and it is expected that it will NOT work on Chrome or Firefox. The BrowserWindow object that gets returned when you launch a browser is what you should be using throughout a single test case execution. The recommendation is to replace this:-
      public void ClickOnLink(string browserName, string docFriendlyName, div FriendlyName, string linkInnerText)
                  BrowserWindow browser = new BrowserWindow();
                  browser.TechnologyName = "MSAA";
                  browser.SearchProperties.Add("Name", browserName, PropertyExpressionOperator.Contains);
      public void ClickOnLink(BrowserWindow bw)
    • Hi Srishti,we are not facing problem with browser.The problem is with 
      HtmlDiv hDiv = new HtmlDiv(hDoc);
      Have you tried our above code with firefox and chrome ?
    • Also as you and abhijeet suggest to use browserwindow.Locate() with title as attribute, but the fact that Title get changed with different browser so how to deal with.
      If you know the solution will you please paste the same for our above code ? 
    • I can't say based on the code shared. Can you please generate code using coded ui test builder and use the same properties to playback- including the entire hierarchy.
      You can add multiple WindowTitles for the same Window and the search will pass if it matches any one, it will pass. Use Builder and generate code to see if it adds any other properties that you could use instead of the Title.
  • FilterProperties and FriendlyName doesnt work with non-IE browsers?
    2 Posts | Last post June 24, 2014
    • I have observed few issues while cross-browser testing. Just need to confirm if they are real issues or only i am facing those. If they are, any alternative or solutions for them.
      1. FilterProperties doesnt actually filter out the controls. I have tested it for "HtmlDiv".
      2. FriendlyName property doesnt work with "HtmlDiv".
    • We support FilterProperties on Cross Browser only for TagInstance. Here is a blog with some more details -
  • Cross browser with Chrome - Browser closed automatically
    12 Posts | Last post June 24, 2014
    • I am trying to cross browser testing with Chrome. Installed the Chrome driver.
      Use below code in my test method.
      BrowserWindow.CurrentBrowser = "Chrome";
      When run the test, it jusy invoke my URL in chrome and get close without executing next test steps. This works in IE.
      Can any one let me know the solution, any Driver / browser version combination I need to use ?
    • Hi Patilsudhir,
      Are you running your test as an admin? There is a known issue with navigating in chrome opened as admin process. Can you please run it as a normal user and try. You would be getting  a "Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: The HTTP request to the remote WebDriver server for URL http://localhost:58679/session/c03c325820e1295c76eb5ca2318921e4/title timed out after 60 seconds" in this case.
      If this is not the case what is the version of chrome you are using? Are you able to run the same test on firefox?
    • @cra2y80y--
      The current version of the plugin is working with Firefox as well, we have verified that and have hence not updated a newer version of the plugin. Please ensure that you have the latest version of the selenium binaries as well.
    • Hi Abhijee
    • Hi Abhijeet I ahave tried without Admin also. Still same issue.
      I amusing Chrome version - 35.0, Chrome driver version as v2.8.241075.
      I amgetting error as Exception caught: Could not locate the browser window, window name not specified.
      I am facing same issue with firefox too.
    • Patilsudhir,
      Your generated code seems to have a locate for a launch. Can you paste the code you are using to test here. Also can you make sure that all instances of chrome are closed before running the test.
      Parallely can you just perform a simple launch and navigate and let us know if that is working:
      BrowserWindow.CurrentBrowser = "chrome";
      BrowserWindow window = BrowserWindow.Launch("");
      window.NavigateToUrl(new Uri(""));
      It works for us with the same chrome driver and chrome version : 35.0.1916.153 m.
    • Hi Abhijeet
      I have tried with your code for chrome, it first open the command window saying Starting chromedriver, 
      Before inserting the url for , I observe data:, in the url text.
      also see, text in chrome as ' you are using unsupported command inne flag--ignore certificate error.Stability and security wil suffer.
      Later it navigate to
      but then it gives chromedriver.exe has stopped working.
      For Firefox everything works fine.
    • Hi Abhijeet regarding the Chrome driver stopping, it appears sometime.
      Regarding my Code pls see below code. I am using hand coding in which I am passing the property values in the coded it self.
      Below is my TestMethod
      public void VerifyCommonLandingPage()
                  string filePath = ConfigurationManager.AppSettings.Get("TestDataPath") + "CommonLandingPageData.csv";
                  string siteUri = ConfigurationManager.AppSettings.Get("OceanSiteUri");
                  string[] linkName = commonObj.ReadFromCsvFiles(filePath, 0, 1);
                  string[] redirectedPageTitle = commonObj.ReadFromCsvFiles(filePath, 0, 2);
                  BrowserWindow.CurrentBrowser = "chrome";
                  for (int i = 0; i < linkName.Length; i++)
                      commonObj.VerifyLinks("Home", "Home", linkName[i]);
      In this I am verifying the links present on the page. The link name I am passing from excel.
      Regarding my actual VerifyLinks method its taking three parameters, browser Name, Document name and the Link name to verify.
      Pls see below coded for VerifyLinks method 
    • Hi Abhijeet any hine.
      Below is my actual Test method which I have written by handcoding.
      public void VerifyLinks(string browserName, string docFriendlyName, string linkName)
                  BrowserWindow browser = SetBrowser(browserName);
                  HtmlDocument hDoc = SetDoc(docFriendlyName, browser);
                  HtmlControl hControl = new HtmlControl(hDoc);
                  hControl.TechnologyName = "Web";
                  hControl.SearchProperties.Add("ControlType", "Hyperlink");
                  UITestControlCollection collection = hControl.FindMatchingControls();
                  int count = 0;
                  foreach (UITestControl links in collection)
                      HtmlHyperlink hLink = (HtmlHyperlink)links;
                      if (string.Equals(linkName, hLink.InnerText))
                  if (count != 1)
                      Assert.Fail("Failed to find the given link on this page");
    • Patilsudhir,
      The issue with chromedriver is a known issue and I would really encourage you to report this on their webpage: What we noticed with this is it happens fairly often during the first few runs but reduces thereafter. Meanwhile we will investigate this further to see if we can fix anything at our end.
    • Hi Abhijeet we have resolved the issue. The issue is with browser.Setfocus().browser object is of MSAA technology type and setfocus() doesnot works with MSAA technology type. We have removed this and it works.WE have tested it for few methods and working well. For few method may be we need to chnage the object properties.But need a unique method which should work for any browser type. Any way our major issue get resolved.Thanks Abhijet for valuable support.
    • Me too facing the same issue. 
      As per my observation, My web page is not loading fully.
      Are there any way to increase the web driver http request timeout. By default it is 30 sec. If we are able to set it through our c# scripts, it will be very helpful.
  • Can't find element in a Unordered in Firefox
    3 Posts | Last post June 14, 2014
    • Hi Guys,
      I have a dropdown list in my AUT, and it seems that in Firefox if the item I want to select isn't visible the innertext property results in a empty string. Using Firefox's web developer tools to inspect the element, I see the innertext 
      <ul class="select2-choices">
         <li class="select2-search-choice">
         <li class="select2-search-choice">
      but it looks like CodedUI is looking for onscreen visible items? How can I use what I see in the web inspector?
    • Hi llucMITEK,
      Have you got any solution to the above reported issue. I am also facing the same issue.
    • Hi,
      Is this only on firefox? I have not seen this earlier. Can you please point us to a repro page to understand this better? I'm assuming you are on the latest version of the browsers and are using the latest msi. 
  • CrossBrowserProxy FireFox v29 issue
    4 Posts | Last post June 13, 2014
    • Firefox v29 is currently not working with the current version of the CrossBrowserProxy.dll, when running with version 29 of Firefox the exe can be seen in the Task Manager but no GUI is displayed to the user.  Installing older version 27 works correctly.
      Do we have a date when the Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowserProxy.dll  will be updated to be compatible with the latest version of Firefox.
    • @cra2y80y--
      The current version of the plugin is working with Firefox as well, we have verified that and have hence not updated a newer version of the plugin. Please ensure that you have the latest version of the selenium binaries as well.
    • Hi,
      I have just tried a basic scenario on Firefox 29.0.1 and things work out fine. What scenario is not working for you? Can you share a sample code?
      Also, at any time if you would want to update your selenium components you can always pick it up manually from You would need to pick up the and drop the net40 components in "Cross Browser Selenium Components" folder as described in the description section and CUIT would use the latest components.
    • Thanks can confirm is now working with selenium plugin version 2.42, the previous one I downloaded fired up the firefox.exe but never loaded the GUI up.
1 - 10 of 83 Items