Coded UI Interview Questions & Answers

  • Question 1. What Is Automation Testing?

    Answer :

    Automation Testing is a process where tester writes the scripts using automation tool and execute the scripts to test the product/Software/application by comparing the actual results with expected results.

  • Question 2. Why Going For Coded Ui Automation Testing?

    Answer :

    • For Coded UI we can use Visual Studio IDE to write scripts.
    • Coded UI scripts can be executed using Visual Studio or by using Microsoft Test Manager (MTM).
    • For Coded UI we can write the script with Visual Studio with which we can use all object programming concepts if required.
    • Coded UI supports windows applications, web applications, WPF applications, Sharepoint applications, Client applications and CRM web client applications.
    • Coded UI offers support to any information source managed by .NET framework. Coded UI supports file formats of .csv, .xml or information sources like SQL server table, access table etc.
  • CSS3 Interview Questions

  • Question 3. How Much % Of Testing Will Be Covered For Automation Testing?

    Answer :

    In automation testing, mostly the below conditioned test cases can only be automated:

    • Critical Scenarios test cases.
    • Repeated test cases.
    • Time consuming test cases.
    • Test cases which are difficult to perform manual test cases.

    Considering the above situations 60-70 % of testing can be covered for automation testing. Also height, width and colours of controls in application/software/product can’t be tested.

  • Question 4. How Many Types Of Programming Approaches Available In Coded Ui?

    Answer :

    3 Types of programming available in Coded UI.

    1. Complete Descriptive Programming.
    2. Programming using UI Map.
    3. Recording and Playback.
  • CSS3 Tutorial

  • Question 5. How Controls Will Be Recognized In Coded Ui?

    Answer :

    There is a tool accessible in Coded UI named Test Builder. In this Test Builder there is an option named ‘Cross Hair’, using this cross hair we can recognize the controls and can view the property information of controls.

  • HTML 5 Interview Questions

  • Question 6. Explain About Test Builder?

    Answer :

    Test Builder is a tool accessible in Coded UI which contains 4 options

    1. Record: is used to record the actions.
    2. Show Recorded Steps: used to show all the recorded steps.
    3. Cross Hair: is used to recognize the controls and can view the property information of controls.
    4. Generate Code: used to generate the code for the recorded actions.
  • Question 7. What Is The Namespace To Work On Coded Ui Controls?

    Answer :

    Below the namespace to work on Coded UI:

    using Microsoft.VisualStudio.TestTools.UITesting;

    using Microsoft.VisualStudio.TestTools.UnitTesting;

    using Microsoft.VisualStudio.TestTools.UITest.Extension;

  • HTML 5 Tutorial Java Script Interview Questions

  • Question 8. What Is The Namespace To Work On Web Controls?

    Answer :

    Below the namespace to work on Web Controls in Coded UI

    using Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;

  • Question 9. What Is Test Method In Coded Ui?

    Answer :

    In Coded UI, 1 TestMethod is same as 1 Test case.

  • C#. NET Interview Questions

  • Question 10. What Are Test Initialize And Test Cleanup Coded Ui?

    Answer :

    Test Initialize attribute is same as TestMethod which executes before a TestMethod by default. Browser launch, login functionality will be scripted in Test Initialize.

    Test Clean Up attribute is same as TestMethod which executes after a TestMethod by default. Closing the browser, clearing cache, clearing cookies and log out functionality will be scripted in Test Clean Up.

  • Java Script Tutorial

  • Question 11. What Is Attribute Coded Ui? And Give Some List Of Attributes?

    Answer :

    [TestMethod] is an attribute before method in class and indicates the method should be executed to perform a test.

    [DataSource(…)] is an attribute which is used for Data Driven Testing.

    Like wise there are many attributes available in Coded UI:






  • QTP Interview Questions

  • Question 12. What Is Approach To Perform Mouse Click Operation?

    Answer :

    using Click() method we can perform click operation on any control in Coded UI.

    Total there are 10 Click() overload methods mentioned below:

    • Mouse.Click();
    • Mouse.Click(ModifierKeys modifierKeys);
    • Mouse.Click(MouseButtons button);
    • Mouse.Click(Point screenCoordinate);
    • Mouse.Click(UITestControl control);
    • Mouse.Click(UITestControl control, ModifierKeys modifierKeys);
    • Mouse.Click(UITestControl control, MouseButtons button);
    • Mouse.Click(UITestControl control, Point relativeCoordinate);
    • Mouse.Click(MouseButtons button, ModifierKeys modifierKeys, Point screenCoordinate);
    • Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate);
  • CSS3 Interview Questions

  • Question 13. What Is Alternative Approach To Perform Click Operation(without

    Answer :

    Move the control on to ui element using Keyboard.SendKeys(“{TAB}”); then use Keyboard.SendKeys(“{ENTER}”); to perform click operation

  • C#. NET Tutorial

  • Question 14. What Are Search Properties And Filter Properties?

    Answer :

    Search Properties are Mandatory (Primary) Properties which perform AND operation

    Filter Properties are Secondary properties which perform OR operation

  • Question 15. How Many Ui Maps Can Be Created In Coded Ui?

    Answer :

    Any number of UIMaps can be created in Coded UI.

  • Manual Testing Interview Questions

  • Question 16. How To Access The New Ui Map Controls From Another Cs File?

    Answer :

    Using Get and Set properties we can access the new UI Map controls in another cs files. Below the sample code.

    public UIMap UIMap




    if (( == null))

    { = new UIMap();





    private UIMap map;

  • QTP Tutorial

  • Question 17. Assertion And Uses?

    Answer :

    Assertions is same as validations which helps to verify if the actual output is same as expected output.

    Below are some important classes used in Coded UI:

    • Assert
    • StringAssert
    • AssertFailedException
    • AssertInconclusiveException
  • Selenium Interview Questions

  • Question 18. Why We Are Going Assertions Instead Of If-else?

    Answer :

    When IF-Else is used and if test case fails still Coded UI passes the TestMethod, to overcome this issue Coded UI introduced Assertions.

  • HTML 5 Interview Questions

  • Question 19. How Many Assertions Can Be There In A Test Method?

    Answer :

    There can be any number on Assertions.

  • Selenium Tutorial

  • Question 20. Difference Between Assert.isequal() And Assert.aresame()?

    Answer :

    Assert.IsEqual() refers to control value.

    Assert.AreSame() refers to reference of the control.

  • CSS Advanced Interview Questions

  • Question 21. What Is Synchronization?

    Answer :

    Making sure that the speed of automation scripts execution should be in sync with application under test (AUT) response/speed.

  • Question 22. Levels Of Synchronization?

    Answer :

    Two levels of Synchronization:

    1. Test level Synchronization.
    2. Statement level Synchronization
  • CSS Advanced Tutorial

  • Question 23. What Are Conditional Statements In Synchronization?

    Answer :

    Statements executes depending on some condition. In coded UI there are 8 Conditional Statements:

    • WaitForControlReady()
    • WaitForControlEnabled()
    • WaitForControlExist()
    • WaitForControlNotExist()
    • WaitForControlPropertyEqual()
    • WaitForControlPropertyNotEqual()
    • WaitForControlCondition()
    • WaitForCondition()
  • Automation Testing Interview Questions

  • Question 24. What Are Unconditional Statements In Synchronization?

    Answer :

    Statements executed without any condition. In coded UI there is 1 Unconditional Statement Playback.wait().

  • Java Script Interview Questions

  • Question 25. Explain Waitforcontrolenabled, Waitforcontrolexist And Waitforcontrolready?

    Answer :

    WaitForControlEnabled(): Waits for control to be enabled.

    WaitForControlExist(): Waits for control to exist on UI.

    WaitForControlReady():Waits for the control to be ready to accept keyboard or mouse input.

  • Software testing Tutorial

  • Question 26. What Is Mouse Click Using Coordinates?

    Answer :

    Mouse.Click(control, new Point(49, 3));

    Coded UI will perform click operation exactly on 49,3 point of the control.

  • Software testing Interview Questions

  • Question 27. Explain About Data Directory?

    Answer :

    Data Directory means Project Directory/Project folder.

  • C#. NET Interview Questions

  • Question 28. Explain Playback.playbacksettings.continueonerror?

    Answer :

    Generally in Coded UI at the time of script execution if any error occurs the execution will stop and test method fails.

    If the execution wants still to continue if any error occurs then the below statement is helpful

    Playback.PlaybackSettings.ContinueOnError = true;

  • Question 29. How Many Types Of Ddt Available On Coded Ui?

    Answer :

    Data Driven Testing can be done in Coded UI using 5 Data Source types:

    • Using CSV 
    • using XML
    • using Excel
    • using SQL 
    • using Test case in TFS
  • Test Cases Interview Questions

  • Question 30. What Are The 4 Major Steps In Ddt?

    Answer :

    Below are the 4 major steps for DDT in Coded UI:

    1.Prepare the test data.

    •     If working on CSV/XML/EXCEL, create respective file and add the test data.
    •     If working on SQL/TFS directly add the test data to respective table/test case.

    2.Add the Data Source Attribute.
    3.Get the test data from file and map to respective control.
    4. Right click on file, go to properties and change the Copy to Output Directory value to ‘Copy always’.