locked
Coded UI : How to spy a control object in other than IE browser RRS feed

  • Question

  • Hi,

    I am developing script for a web application using coded UI , but the application will support only Chrome and Firfox , it will not support IE , please suggest me how i can spy the object. Coded UI builder is not supporting other browser for spying .

    Regards,

    Shibin KM 

    Friday, August 4, 2017 9:10 AM

All replies

  • Hi Shibin,

    Thanks for you posting.

    If you want to perform functional testing of web application across Firefox and Chrome, I suggest you use IE to record tests and validate control properties using coded UI test builder. Then, perform cross browser tests via hand code. We could set “BrowserWindow.CurrentBrowser” as “Firefox” or “Chrome” in the test depending on which browser she wants to test before running from the test explorer.

    Please install cross-browser testing installer:

    You could through an installer on Visual Studio Gallery (Tools -> Extensions and Updates… -> Online, Visual Studio Gallery), search with “Selenium components for Coded UI Cross Browser Testing”, click Download.

    Please set the browser refer to sample code below:

    BrowserWindow.CurrentBrowser = "chrome";
    
    BrowserWindow.Launch("http://www.bing.com");

    For more details, please refer to this link: https://marketplace.visualstudio.com/items?itemName=AtinBansal.SeleniumcomponentsforCodedUICrossBrowserTesting

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, August 7, 2017 2:33 AM
  • Hi Fletcher,

    I am doing same way , but my application is not supporting IE(Supporting only Chrome and Firefox), Few elements are not displaying in IE. So i am not able to spy object in IE also. 

    Please suggest if there is any other way to proceed automation like adding some plugin etc ...

    Regards,

    Shibin KM 

    Monday, August 7, 2017 11:07 AM
  • Hi Shibin,

    Thanks for your response.

    I see. It seems that this object you mentioned is not supported by Coded UI, it might be custom or third-part control, which is a bit completed to test them actually. But still could be possible to test it stand alone(according to this MSDN article), however the difficulty is that the control is not supported by IE either, and we have to record test in IE first, you know, so for now I don't think Coded UI test could reach your requirement.

    Many thanks for your understanding.

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Tuesday, August 8, 2017 3:21 AM
    • Proposed as answer by Fletch Zhou Wednesday, August 9, 2017 4:10 AM
    Tuesday, August 8, 2017 3:21 AM
  • Dear Shibin,

    Did you get a solution for your issue ? The control you are not able to spy, if they are third party control, please see how your development team have added them to their development solution. Please try adding same to your coded ui project and build the application. U never know it may allow you to spy the control.

    Thanks & Regards,


    Ahetejazahmad Khan.

    Wednesday, August 30, 2017 11:12 AM