Coded UI Interview Questions and Answers

Coded UI Interview Questions and Answers

Last updated on 14th Oct 2020, Blog, Interview Question

About author

Jagadesh (Sr OAF Consultant )

He is Possessing 11+ Years Of Experience in Coded UI. His Passion lies in Developing Entrepreneurs & Activities. Also, Rendered his intelligence to the Enthusiastic JOB Seekers.

(5.0) | 15264 Ratings 2295

Test automation plays a very important role in the entire software lifecycle. Most of the time when we want to prepare for an automation testing interview, we only focus on tool-specific questions. 

However, we should also consider the fact that learning and knowing the tool is just a mean and it’s not the ultimate goal.

Thus, whenever we are preparing for an automation tester interview, we have to consider “Automation” as a whole and focus on the framework and the steps involved.

We all know that software testing is a very important part of software development. But, with the rapidly growing software development methodologies and environments, it becomes difficult to manually test everything for an application within a limited time along with cost constraints.

Thus, Automation testing is rapidly growing in the market to speed up to the development pace. This tutorial includes top interview questions on Automation testing. I have tried to cite down the short and quick questions which are very much specific to the automation as a whole and are not specific to any “tool”.

1. What Is Automation Testing?


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

2. Why Going For Coded Ui Automation Testing?


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.

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


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.

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


3 Types of programming available in Coded UI.

  • Complete Descriptive Programming.
  • Programming using a UI Map.
  • Recording and Playback.
  • CSS3 Tutorial

5. How Controls Will Be Recognized In Coded Ui?


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

6. Explain About Test Builder?


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

Record: is used to record the actions.

Show Recorded Steps: used to show all the recorded steps.

Cross Hair: is used to recognize the controls and can view the property information of controls.

Generate Code: used to generate the code for the recorded actions.

7. What Is The Namespace To Work On Coded Ui Controls?


Below the namespace to work on Coded UI:

  • using Microsoft.VisualStudio.TestTools.UITesting;
  • using Microsoft.VisualStudio.TestTools.UnitTesting;
  • using Microsoft.VisualStudio.TestTools.UITest.Extension;

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


Below the namespace to work on Web Controls in Coded UI

  • Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;

9. What Is the Test Method In a Coded Ui?


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

10. What Are Testinitialize And TestCleanup Coded Ui?


Test Initialize attribute is the 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 the same as TestMethod which executes after a TestMethod by default. Closing the browser, clearing cache, clearing cookies and logout functionality will be scripted in Test Clean Up.

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


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

Likewise there are many attributes available in Coded UI:

  • [TestMethod]
  • [TestCleanup]
  • [TestInitialize]
  • [TestClass]
  • [AssemblyCleanup]

12. What Is the Approach To Perform Mouse Click Operation?


using the Click() method we can perform click operation on any control in the 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);

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


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

Subscribe For Free Demo

Error: Contact form not found.

14. How Many Ui Maps Can Be Created In Coded Ui?


Any number of UIMaps can be created in a Coded UI.

15. How To Access The New Ui Map Controls From Another Cs File?


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

  • public UIMap UIMap
  • {
  • get
  • {
  • if (( == null))
  • {
  • = new UIMap();
  • }
  • return;
  • }
  • }
  • private UIMap map;

16. Assertion And Uses?


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

Below are some important classes used in Coded UI:





17. Why Are We Going Assertions Instead Of If-else?


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

18. How Many Assertions Can Be There In A Test Method?


There can be any number on Assertions.

19. Difference Between Assert.isequal() And Assert.aresame()?


Assert.IsEqual() refers to control value.

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

20. What Is Synchronization?


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

21. Levels Of Synchronization?


Two levels of Synchronization:

Test level Synchronization.

Statement level Synchronization

22. What Are Conditional Statements In Synchronization?


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









23. What Are Unconditional Statements In Synchronization?


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

24. Explain Waitforcontrolenabled, Waitforcontrolexist And Waitforcontrolready?


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.

25. What Is Mouse Click Using Coordinates?


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

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

26. Explain About Data Directory?


Data Directory means Project Directory/Project folder.

27. Explain Playback.playbacksettings.continueonerror?


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

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

  • Playback.PlaybackSettings.ContinueOnError = true;

28. How Many Types Of Ddt Available On Coded Ui?


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

29. What Are The 4 Major Steps In Ddt?


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

1.Prepare the test data.

  •  If working on CSV/XML/EXCEL, create a respective file and add the test data.
  •     If working on SQL/TFS directly add the test data to the 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’.

30. What all things can you automate?


  • Regression test suite
  • Smoke / Sanity test suite
  • Build deployment
  • Test data creation
  • Automating behind the GUI like testing of APIs and methods.

31. When is Automation testing useful?


Automation testing is useful in the following scenarios:

a) Regression testing: In case of a bug fix or new module implementation, we have to make sure that the already implemented or unchanged functionality is not affected. In this case, we end up running the regression test case multiple times.

For Example: After each change request or bug fix, after each iteration in case of incremental development approach, etc.

b) Non-functional Testing: Testing the non-functional aspects of an application.

For Example,

Load testing or performance testing, etc are very difficult for humans to track and analyze.

c) Complex calculation checks or test scenarios that are prone to human errors.

d) Repeated execution of the same tests: Sometimes, we have to run the same set of test cases for a different set of data or after each build release or on multiple hardware, software or combination of both.

Automating the test cases in the above scenarios helps in achieving the speed of testing and minimizing human errors.

32. How do you identify the test cases which are suitable for automation?


Identifying the appropriate test cases for automation is the most important step towards automation.

33. Can you achieve 100% automation?


100% automation would be difficult to achieve because there would be many edge test cases and some cases that are executed seldom. Automating these cases which are not executed that often will not add value to the automated suite.

34. How to decide the tool that one should use for Automation testing in their projects?


In order to identify the tool for Automation testing in your project:

a) Understand your project requirements thoroughly and identify the testing scenarios that you want to automate.

b) Search for the list of tools that support your project’s requirements.

c) Identify your budget for the automation tool. Select the tools within your budget.

d) Identify if you already have skilled resources for the tools. If you don’t have the necessary skilled resources then identify the cost for training the existing resources or hiring new resources.

e) Now compare each tool for key criteria like:

  • How easy is it to develop and maintain the scripts for the tool?
  • Can a non-technical person also execute the test cases with little training?
  • Does the tool support different types of platforms like web, mobile, desktop, etc based on your project requirements?
  • Does the tool have a test reporting functionality? If not, is it easily configurable for the tool?
  • How is the tool for cross-browser support for web-based applications?
  • How many different testing types can this tool support?
  • How many languages does the tool support?

f) Once you have compared the tools, select the tool which is within your budget and support your project requirements, and give you more advantages based on the key criteria mentioned above.

35. Currently I do not have any automation in place in my project, but now I want to implement automation, what would be my steps?


  • First, identify which type of testing/test cases you want to automate.
  • Identify the tool
  • Design the framework
  • Create utility files and environment files.
  • Start scripting
  • Identify and work on reporting.
  • Allocating time for enhancing and maintaining the scripts.

Steps required for getting Automation Testing in place for a project include:

  • Understand the advantages and disadvantages of automation testing and identify the test scenarios which are suitable for automation.
  • Select the automation tool that is best suited for automating the identified scenarios
  • Find the tool expert to help in setting up the tool and required environment for executing the test cases using the tool.
  • Train the team so that they can write scripts in the programming language that the tool supports.
  • Create the test framework or identify the already existing one that meets your requirements.
  • Write an execution plan for OS, browsers, mobile devices, etc.
  • Write programming scripts for manual test cases to convert them into automated test cases.
  • Report the test case status by using the reporting feature of the tool.
  • Maintain the scripts for ongoing changes or new features.

36. How do you decide which tool you have to use?


Concluding which tool is best suitable for the project requires a lot of brainstorming and discussions.

Course Curriculum

Learn Coded UI Training with In-Depth Concepts From Industry Trainers

  • Instructor-led Sessions
  • Real-life Case Studies
  • Assignments
Explore Curriculum

37. Once you identify the tool what would be your next steps?


Once we finalize the tool, our next step would be to design the framework.

38. What is a framework?


A framework is a set of the structure of the entire automation suite. It is also a guideline, which if followed can result in a structure that is easy to maintain and enhance.

These guidelines include:

  • Coding standards
  • Handling the test data
  • Maintaining and handling the elements (object repository in QTP)
  • Handling of environment files and properties file
  • Reporting of data
  • Handling logs

39. What are the attributes of a good framework?


The characteristics include:

Modular: The framework should be adaptable to change. Testers should be able to modify the scripts as per the environment or login information change.

Reusable: The commonly used methods or utilities should be written in a common file that is accessible to all the scripts.

Consistent: The suite should be written in a consistent format by following all the accepted coding practices.

Independent: The scripts should be written in such a way that they are independent of each other. In case one test fails, it should not hold back the remaining test cases (unless it is a login page)

Logger: It is good to have implemented the logging feature in the framework. This would help in case our scripts run for longer hours (say nightly mode), if the script fails at any point of time, having the log file will help us to detect the location along with the type of the error.

Reporting: It is good to have the reporting feature automatically embedded into the framework. Once the scripting is done, we can have the results and reports sent via email.

Integration: Automation Framework should be such that it is easy to integrate with other applications like continuous integration or triggering the automated script as soon as the build is deployed.

40. Can you do without a framework?


Frameworks are guidelines and not mandatory rules, so we can do without a framework, but if we create it and follow it, enhancing and maintaining would be easy to implement.

44. What are the different types of the Automation tool that you are aware of?


Open source tools like Selenium, JMeter, etc.

Paid tools like QTP, Load Runner, Ranorex, RFT, and Rational Robot.

41.What generally is the structure of a framework?


Normally the structure should have – (It would differ from project to project)

  • A “src” (source) folder having the actual test scripts.
  • A”lib” (library) folder having all the libraries and common methods.
  • A “class” folder having all the class files (in-case using java).
  • A “log” folder having the log file(s).
  • A file/folder having all the web element Ids.
  • A file containing the URL, environment and login information.

42. Where will you maintain information like URL, login, password?


This information should always be maintained in a separate file.

43. Why do you want to keep this kind of information in a separate file and not directly in the code?


URL, Login, and passwords are the kind of fields that are used very often and these change as per the environment and authorization. In case we hard code it into our code, we have to change it in every file which has its reference.

In case if there are more than 100 files, then it becomes very difficult to change all the 100 files and this, in turn, can lead to errors. So this kind of information is maintained in a separate file so that updating becomes easy.

44. What are the different types of frameworks?


Different types of frameworks includes:

  • Keyword-driven framework
  • Data-Driven framework
  • Hybrid Framework
  • Linear Scripting

45. Can you tell some good coding practices while automation?


Some of the good coding practices include:

  • Add appropriate comments.
  • Identify the reusable methods and write it in a separate file.
  • Follow the language-specific coding conventions.
  • Maintain the test data in a separate file.
  • Run your scripts regularly.

46. Any kind of test which you think should not be automated?


  • Tests that are seldom executed.
  • Exploratory testing
  • Usability testing
  • Test which is executed quickly when done manually.

47. Do you think that testing can be done only at the UI level?


Today as we are moving to the Agile mode, testing is not limited to the UI layer. Early feedback is imperial for an agile project. If we concentrate only on the UI layer, we are actually waiting until the UI is developed and available to test.

Rather we can test even before the UI is actually developed. We can directly test the APIs or the methods using tools like Cucumber and FitNesse.

In this way, we are giving the feedback much early and are testing even before the UI is developed. Following this approach will help us to test only the GUI aspect of small cosmetic changes or some validations on the UI and will help the developers by giving more time to fix the bugs.

48. How do you select which automation tool is best suited for you?


Selecting the automation tool depends upon various factors like:

  • The scope of the application which we want to automate.
  • Management overhead like cost and budget.
  • Time to learn and implement the tool.
  • Type of support available for the tool.
  • Limitation of the tool

49. What do you think holds the testers back to do automation? Is there a way to overcome it?


The major hurdle for testers is to learn programming/coding when they want to automate. Since testers do not code, adapting to coding is a bit challenging for testers.

We can overcome it by:

  • Collaborating with developers when automating.
  • Considering that automation is the responsibility of the whole team and not only of the testers.
  • Giving dedicated time and focus on automation.
  • Getting proper management support.

You can save these automation testing interview questions as a pdf and print for further reading.

50. What is an Automation testing framework?


A framework, in general, is a set of guidelines. A set of guidelines, assumptions, concepts and coding practices for creating an execution environment in which the tests will be automated, is known as an Automation testing framework.

An automation testing framework is responsible for creating a test harness with a mechanism to connect with the application under test, take input from a file, execute the test cases and generate the reports for test execution. An automation testing framework should be independent of the application and it should be easy to use, modify or extend.

51. What are the important modules of an automation testing framework?


Important modules of an Automation testing framework are:

Test Assertion Tool: This tool will provide assert statements for testing the expected values in the application under test. For Example. TestNG, Junit, etc.

Data Setup: Each test case needs to take the user data either from the database or from a file or embedded in the test script. Frameworks data module should take care of the data intake for test scripts and the global variables.

Build Management Tool: Framework needs to be built and deployed for the use of creating test scripts.

Continuous integration tool: With CICD (Continuous Integration and Continuous Development) in place, a continuous integration tool is required for integrating and deploying the changes done in the framework at each iteration.

Reporting tool: A reporting tool is required to generate a readable report after the test cases are executed for a better view of the steps, results, and failures.

Logging tool: The logging tool in the framework helps in better debugging of the error and bugs.

52. Explain some Automation testing tools.


Some of the famous Automation testing tools are explained below:

(i) Selenium: Selenium is a test framework for web application automation testing. It supports multiple browsers and is OS independent. Selenium also supports various programming languages like Java, C#, PHP, Ruby, and Perl, etc.

Selenium is an open-source set of libraries which can be used to develop additional test frameworks or test scripts for testing web-based applications.

(ii) UFT: Unified Functional Testing is a licensed tool for functional testing. It provides a wide range of features like APIs, web services, etc and also supports multiple platforms like desktops, web, and mobile. UFT scripts are written in visual basic scripting language.

(iii) Appium: Appium is an open-source mobile application testing tool. It is used to automate testing on cross-platform, native, hybrid and web-based mobile applications. Appium automates any mobile application from any language with full access to APIs and DBs from the test code.

Appium is based on the client-server architecture and has evolved from selenium.

(iv) Cucumber: Cucumber is an open-source behavior-driven development tool. It is used for web-based application automation testing and supports languages like ruby, java, scala, groovy, etc. Cucumber reads executable specifications written in plain text and tests the application under test for those specifications.

For cucumber to understand the scenarios in plain text, we have to follow some basic syntax rules which are known as Gherkin.

(v) TestComplete: TestComplete is a licensed automated UI testing tool to test the application across different platforms like desktops, web, mobile, etc. It provides flexibility to record a test case on one browser and run it on multiple browsers and thus supports cross browsers testing.

TestComplete has an inbuilt object recognition algorithm which uniquely identifies an object and stores it in the repository.

53. What are the different types of testing framework techniques?


There are four types of automation testing framework techniques.

They are:

(i) Modular Testing framework:

This framework is built on the concept of abstraction. In this framework, the tester creates scripts for each module of the application under test individually and then these scripts are combined in the hierarchical order to create large test cases.

It creates an abstraction layer between the modules, thus any modifications in test scripts for one module do not affect any other modules.

Advantages of this framework:

  • Easier maintenance and scalability of test cases.
  • Creating test cases by using already scripted modules is easier and faster.


  • Test cases have data embedded in them. Thus executing the same test script with different data is a big change at the script level.

(ii) Data-Driven Testing framework:

In the Data-driven testing framework, the input data and the expected output data corresponding to the input data is stored in a file or database and the automated script runs the same set of test steps for multiple sets of data. With this framework, we can run multiple test cases where only the input data differs and the steps of execution are the same.


  • Reduces the number of test scripts that are required to be executed. We execute the same script multiple times with different data.
  • Less coding for automation testing.
  • Greater flexibility for maintaining and fixing the bugs or enhancing the functionality.
  • Test data can be created even before the automated system for testing is ready.


  • Only similar test cases with the same set of execution steps can be combined for multiple sets of data. The different set of execution steps require a different test case.

(iii) Keyword-Driven Testing framework:

It is an application-independent testing framework that uses data tables and self-explanatory keywords. Keywords explain the actions to be performed on the application under test and the data table provides the input and expected output data.

Keyword-based testing is an increment to data-driven testing.


  • Less coding and the same script can be used for multiple sets of data.
  • Automation expertise is not required for creating a test case using the already existing keywords for actions.
  • Same keywords can be used across multiple test cases.


  • This framework is more complicated as it needs to take care of the keyword actions and also the data input.
  • Test cases get longer and complex thereby affecting the maintainability of the same.

(iv) Hybrid Testing framework:

This framework is a combination of all the above-mentioned testing frameworks ( Modular, Data-driven, and Keyword-driven).

In this framework, the test cases are developed from modular scripts by combining them in the modular testing framework. Each of the test cases uses a driver script that uses a data file as in the data-driven framework and a keyword-based action file.


  • Modular and easy to maintain.
  • Less coding can take care of more test cases.
  • One test case can be executed with multiple sets of data.


  • Complex to read, maintain and enhance.

54. When do you prefer Manual testing over Automation testing?


We prefer manual testing over automation testing in the following cases:

  • The project is short-term and writing scripts will be time-consuming and costly when compared to manual testing.
  • Flexibility is required. Automated test cases are programmed and run in a specific way of configurations.
  • Usability testing needs to be performed.
  • Applications/modules are newly developed and have no previous test cases.
  • Ad-hoc or exploratory testing needs to be performed.
Course Curriculum

Get Hands-On Learning Coded UI Certification Course By Certified Expert

Weekday / Weekend BatchesSee Batch Details

55. Is Automation testing in agile Methodology useful or not?


Automation testing is useful for regression, smoke or sanity testing. All these types of testing in the traditional waterfall model happen at the end of the cycle and sometimes if there are not many enhancements to the application, we might not even have to do regression testing.

Whereas, in agile methodology, every iteration requires executing the regression test case as some new functionalities are added.

Also, the regression suite itself keeps growing after each sprint as the functional test cases of the current sprint module need to be added to the regression suite for the next sprint.

Thus, Automation testing in agile methodology is very useful and helps in achieving maximum test coverage in less time of the sprint.

56. List some advantages and disadvantages of Automation testing.



  • Fewer human resources
  • Reusability
  • More Test Coverage in less time
  • Reliability
  • Parallel execution of test cases
  • Fast


  • Development and maintenance time is more.
  • Tool Cost
  • Skilled resources are required.
  • Environment setup
  • Test Script debugging is an issue.

57. List some advantages and disadvantages of Manual testing.



  • No environment setup needed.
  • Programming knowledge is not required.
  • Recommended for dynamically changing requirements.
  • Allow human observation power to detect more bugs.
  • The cost is less for short-term projects.
  • Flexibility


  • Difficult to perform complex calculations.
  • Reusability
  • Time taking
  • High risk of human errors or mistakes.
  • More human resources are required.

58. Can we do Automation testing without a framework? If yes, then why do we need a framework?


Yes, We can perform automation testing even without using a framework. We can just understand the tool that we are using for automation and program the steps in the programming language that tools support.

If we automate test cases without a framework then there won’t be any consistency in the programming scripts for test cases.

A framework is required to give a set of guidelines that everyone has to follow to have maintained readability, reusability, and consistency in the test scripts. A framework also provides one common ground for reporting and logging functionality.

59. How will you automate basic “login” functionality test cases for an application?


Assuming that the automation tool and framework is already in place of the test environment.

To test the basic “Login” functionality:

  • Understand the project requirement: Login functionality will have a username textbox, a password textbox, and a login button.
  • Identify the Test scenarios: For login functionality, the possible test scenarios are:
    • Blank username and password
    • Invalid username and password
    • A valid username and invalid password
    • Valid username and password
  • Prepare a Data input file with the data corresponding to each scenario.
  • Launch the tool from the program.
  • Identify the username field, password field, and the login button.
  • For each test scenario, get the data from the data file and enter into the corresponding fields. Program click on the login button after entering the data.
  • Validate the error message for negative scenarios and the success message for positive scenarios in the test script with the help of assertions.
  • Run the test suite and generate the report.

60. Is Automation testing a Black box testing or White-box testing?


Automation testing is mostly a black box testing as we just program the steps that a manual tester performs for application under test without knowing the low-level design or code of the application.

Sometimes, automated test scripts need access to the database details that are used in the application under test or some more coding details and thus can be a type of white-box testing.

Thus automated testing can be both black or white box type of testing depending on the scenarios in which automation is performed.

61. How many test cases have you automated per day?


Well, the number depends on the complexity of the test cases. When the complexity was limited, I was able to automate 5 to 6 test cases per day. Sometimes, I was able to automate only one test case for complex scenarios.

I have also broken down my test cases into different components like, take input, do the calculation, verify the output etc. in case of very complex scenarios and have taken 2 or more days.

62. What factors determine the effectiveness of Automation testing?


Some of the factors that determine the effectiveness of automation testing are:

  • Time saved by running scripts over the manual execution of test cases.
  • Defects found
  • Test Coverage or code coverage
  • Maintenance time or development time
  • Stability of the scripts
  • Test Reusability
  • Quality of the software under test

63. Which test cases can be automated?


Types of test cases which can be automated are:

(i) Smoke test cases: Smoke testing is also known as build verification testing. Smoke test cases are run every time when a new build is released to check the health of the build for acceptance to perform testing.

(ii) Regression Test Cases: Regression testing is the testing to ensure that previously developed modules are functioning as expected after a new module is added or a bug is fixed.

Regression test cases are very crucial in incremental software approaches where a new functionality is added at each increment phase. In this case, regression testing is performed at each incremental phase.

(iii) Complex Calculation test cases: Test cases which involve some complex calculations to verify a field for an application fall into this category. Complex calculation results are more prone to human errors hence when automated they give accurate results.

(iv) Data-driven test cases: Test cases which have the same set of steps and run multiple times with the change of data are known as data-driven test cases. Automated testing for these kinds of test cases is quick and cost-effective.

(v) Non-functional test cases: Test cases like load tests and performance tests require a simulated environment with multiple users and multiple hardware or software combinations.

Setting up multiple environments manually is impossible for each combination or number of users. Automated tools can easily create this environment to perform non-functional testing easily.

64. What are the phases in Automation testing Life Cycle?


The phases in Automation testing life Cycle include:

  1. The decision to perform automation testing.
  2. Identify and learn about the automation tool.
  3. Determine the scope of automation testing.
  4. Design and develop a test suite.
  5. Test Execution
  6. Maintenance of test scripts.

65. What is an Automated test script?


An automated test script is a short program that is written in a programming language to perform a set of instructions on an application under test to verify if the application is as per the requirements.

This program when run, gives the test results as pass or fail to depend on if the application is as per the expectations.

66.What is Test Method in Coded UI?


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

67.What is an alternative approach to perform click operation(without Mouse.Click())?


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

68.What are Search Properties and Filter Properties?


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

Filter Properties are Secondary properties which perform OR operation

69.What is Search Configuration?


Search Configuration in Coded UI:

In Coded UI there are some predefined search configurations to perform actions on controls.

Below are the 5 search configurations.

1. Always Search: UI Test uses cache to perform actions on controls in an application, Always Search force UI test to search the control in the application and not in cache.


  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.AlwaysSearch);

2. Disambiguate Search: If parent and child have the same properties and there is a chance where UI test performs the action on parent itself, Disambiguate search force UI test to perform the action for child control instead of parent control.


  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.DisambiguateChild);

3. Next Sibling: UI test Searches the next sibling in the container and performs the action.


  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.NextSibling);

4. Expand While Search: UI test expands the control before searching the control inside. ex., Tree View


  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.ExpandWhileSearching);

5. Visible Only Search: UI test Performs action only if the control is visible.


  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.VisibleOnly);

Note: When using Coded UI Test Builder to record the actions these configurations will set by default as Coded UI will generate all the code. When using complete Descriptive Programming Implicitly we need to add these Search Configuration settings.

70.How the Password Encryption done in Coded UI?


We cannot pass the password directly to the field for that we need to encrypt the password. In CODED UI we can use Playback.EncryptText(“String value”);, which gives you an output of encrypted string values as a password.

Data Warehouse Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

71.What are the class names to launch a browser in a web application and launch an application in a desktop application?


To launch browser, BrowserWindow class and Launch() method is used.

Sample Code:

  • BrowserWindow.CurrentBrowser = “ie”;
  • BrowserWindow google = BrowserWindow.Launch(“”);

To launch an application, the ApplicationUnderTest class and Launch() method is used.

Sample Code:

  • ApplicationUnderTest calculator = ApplicationUnderTest.Launch(“.exe path of calculator”);

There are 2 radio buttons, radiobutton1 and radiobutton2 and

There are 2 buttons button1 and button2

If radiobutton1 is selected then button1 should be clicked

If radiobutton is selected then button should be clicked

72.Explain (write) the code?


There is a table as below

Column1 S No. Name Score Location

Checkbox1 1 Dhoni 109 Bangalore

Checkbox2 2 Ganguly 45 Chennai

Checkbox3 3 Sachin 63 Bangalore

Checkbox4 4 Rohit 28 Hyderabad

Checkbox5 5 Harbhajan 27 Chennai

Checkbox 6 6 Yuvraj 54 Hyderabad

Checkbox 7 7 Raina 72 Hyderabad

Checkbox 8 8 Kohli 7 Chennai

Checkbox9 9 Patel 21 Bangalore

Check the checkbox in column1 where name contains Sachin.

Are you looking training with Right Jobs?

Contact Us

Popular Courses