Automation Test Engineer

600+ Automation Test Engineer Interview Questions and Answers

Updated 27 Feb 2025

Q101. How do you want to transition from manual to automation test

Ans.

I would start by identifying the most repetitive and time-consuming manual tests and prioritize them for automation.

  • Identify the most repetitive and time-consuming manual tests

  • Prioritize the tests based on their importance and frequency

  • Select the appropriate automation tool and framework

  • Create test scripts and automate the identified tests

  • Execute the automated tests and analyze the results

  • Gradually increase the automation coverage and reduce manual testing

Q102. What is Robot framework? Challenges faced during testing? Types of Testing. How to handle bugs? Whether you will be able to work for extra hours during prod releases?

Ans.

Robot Framework is a generic open-source automation framework for acceptance testing and acceptance test-driven development (ATDD).

  • Robot Framework is a keyword-driven test automation framework that uses tabular test data syntax.

  • Challenges faced during testing include identifying and prioritizing test cases, handling dynamic elements, and maintaining test scripts.

  • Types of testing include functional testing, regression testing, performance testing, and security testing.

  • Handling...read more

Q103. 1.Explain yourself? 2. What framework are you working on? 3. What are different types of waits?

Ans.

I am an automation test engineer with experience in working on various frameworks and implementing different types of waits.

  • I have experience in working on frameworks like Selenium, Appium, TestNG, and JUnit.

  • I have implemented different types of waits like implicit wait, explicit wait, and fluent wait.

  • Implicit wait is used to wait for a certain amount of time before throwing an exception if the element is not found.

  • Explicit wait is used to wait for a certain condition to occu...read more

Q104. Write syntax to take the screenshot in selenium python

Ans.

Syntax to take a screenshot in Selenium Python.

  • Import the necessary modules - 'webdriver' and 'datetime'

  • Create an instance of the webdriver

  • Use the 'get_screenshot_as_file' method to take the screenshot

  • Save the screenshot with a unique name and location

  • Example: driver.get_screenshot_as_file('C:/Screenshots/screenshot.png')

Are these interview questions helpful?

Q105. What is the keyword used in interface if we want concreate method?

Ans.

The keyword used in interface for concrete method is 'default'.

  • The 'default' keyword is used in interfaces to provide a default implementation for a method.

  • It allows interfaces to have concrete methods without requiring implementing classes to override them.

  • Example: 'default void methodName() { // method implementation }'

Q106. 1)Program to read/write data using eggplant

Ans.

Eggplant can read/write data using its built-in scripting language SenseTalk.

  • Use the 'put' command to write data to a file or variable.

  • Use the 'read' command to read data from a file or variable.

  • Eggplant also supports reading/writing data to databases and spreadsheets.

  • Example: put "Hello World" into myVariable; read myVariable

  • Example: put "123" into file "myFile.txt"; read file "myFile.txt"

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q107. Explain different Kinds of Testing.

Ans.

Different kinds of testing include unit testing, integration testing, system testing, acceptance testing, and regression testing.

  • Unit testing: testing individual units or components of the software

  • Integration testing: testing how different units or components work together

  • System testing: testing the entire system as a whole

  • Acceptance testing: testing to ensure the software meets the requirements and is ready for release

  • Regression testing: testing to ensure that changes or upd...read more

Q108. Write the code for mouse click function?

Ans.

Code for mouse click function

  • Use Selenium WebDriver's click() method to simulate mouse click

  • Identify the element using locators like ID, class name, xpath, etc.

  • Example: driver.findElement(By.id("elementID")).click();

Automation Test Engineer Jobs

Test Automation Engineer 5-10 years
Accenture Solutions Pvt Ltd
3.8
Bangalore / Bengaluru
Test Automation Engineer 5-10 years
Accenture Solutions Pvt Ltd
3.8
Bangalore / Bengaluru
Test Automation Engineer 7-12 years
Accenture Solutions Pvt Ltd
3.8
Coimbatore

Q109. Java oops concepts n where did u apply that in automation framework

Ans.

Java OOPs concepts are used in automation framework design for better code organization and reusability.

  • Encapsulation: Used to hide the internal implementation details of classes and provide access through methods.

  • Inheritance: Allows for code reuse by creating parent-child relationships between classes.

  • Polymorphism: Enables methods to behave differently based on the object they are called on.

  • Abstraction: Helps in defining the structure of classes without implementing the deta...read more

Q110. Can you override a Static Method?

Ans.

Yes, a static method can be overridden in Java using the concept of method hiding.

  • In Java, static methods cannot be overridden in the traditional sense like instance methods.

  • When a subclass defines a static method with the same signature as a static method in the superclass, it is called method hiding.

  • Method hiding does not follow polymorphism and is resolved at compile time based on the reference type.

  • Example: class Parent { static void display() { System.out.println("Parent...read more

Q111. What is a constructor and it's purpose?

Ans.

A constructor is a special type of method in a class that is automatically called when an object of that class is created.

  • Constructors have the same name as the class they belong to

  • They are used to initialize the object's state or perform any necessary setup

  • Constructors can have parameters to customize the initialization process

  • Example: public class Car { public Car(String color) { this.color = color; } }

Q112. What is the Parent class of Java?

Ans.

The parent class of Java is the Object class.

  • All classes in Java are directly or indirectly derived from the Object class.

  • The Object class is the root class in Java's class hierarchy.

  • It provides methods that are common to all objects in Java, such as toString(), equals(), and hashCode().

Q113. What is Window Handles in Selenium?

Ans.

Window Handles in Selenium are unique identifiers used to handle multiple browser windows in a Selenium test script.

  • Window Handles are unique alphanumeric strings assigned to each browser window opened by Selenium.

  • They are used to switch between different browser windows during a test script execution.

  • Window Handles can be obtained using getWindowHandles() method in Selenium.

  • Example: Set handles = driver.getWindowHandles();

Q114. 4 - How to read data from excel

Ans.

To read data from Excel, we can use libraries like Apache POI or OpenCSV.

  • Create a FileInputStream object to read the Excel file

  • Create a Workbook object using the FileInputStream object

  • Get the sheet from the Workbook object using sheet name or index

  • Iterate through rows and columns to read data

  • Close the Workbook and FileInputStream objects

Q115. concept of Javascript used in Selenium, i.e. write value without using sendkeys in selenium.

Ans.

Javascript can be used in Selenium to execute scripts and interact with web elements. setValue() method can be used to write values without sendKeys().

  • JavascriptExecutor interface can be used to execute Javascript in Selenium

  • setValue() method can be used to set value of an input field without using sendKeys()

  • Example: JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("document.getElementById('elementId').value='value'");

Q116. Difference b/w Hashmap vs HashTable and which one is faster on basis of performance!

Ans.

HashMap allows null values and keys, while HashTable does not. HashMap is not synchronized, making it faster in performance compared to HashTable.

  • HashMap allows null values and keys, while HashTable does not.

  • HashMap is not synchronized, making it faster in performance compared to HashTable.

  • HashMap is preferred for non-thread-safe applications, while HashTable is preferred for thread-safe applications.

Q117. Print all even numbers in an array exactly like this -> {2,4,6}. Without even concatenating the curly braces.

Ans.

Print even numbers in array without curly braces.

  • Iterate through array and check if each element is even.

  • If element is even, add it to a new array of strings.

  • Join the elements of new array with commas to form final output.

Q118. What is Scenario Outline? What is Background and how it is different from Hooks?

Ans.

Scenario Outline is used in Gherkin to run the same scenario multiple times with different inputs. Background sets up preconditions for all scenarios. Hooks are used for setup and teardown tasks.

  • Scenario Outline is used to run the same scenario with different inputs by using placeholders in the steps.

  • Background is used to set up preconditions that apply to all scenarios in a feature file.

  • Hooks are used for setup and teardown tasks that run before and after scenarios or featur...read more

Q119. Write a program to print how many integer and character from a given string. Input:"nAJh4837sj"

Ans.

A program to count the number of integers and characters in a given string.

  • Iterate through each character in the string and check if it is an integer or a character.

  • Use isdigit() function to check if a character is an integer.

  • Keep separate counters for integers and characters.

  • Return the counts of integers and characters at the end.

Q120. Explain inheritance? Fetching the properties of one class in a different class. It has various types they are ‘single level’, ‘multiple’, ‘multilevel’, ‘hierarchical’, ‘hybrid’.

Ans.

Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.

  • Inheritance allows code reusability and saves time and effort in writing new code.

  • The existing class is called the parent or base class, and the new class is called the child or derived class.

  • The child class inherits all the properties and methods of the parent class and can also add new properties and methods.

  • There are different types of inheri...read more

Q121. How to identify object in Selenium

Ans.

To identify objects in Selenium, we use locators such as ID, Name, Class Name, XPath, CSS Selector, etc.

  • Locators are used to identify web elements on a page

  • ID and Name are the most commonly used locators

  • XPath and CSS Selector are more powerful but slower

  • Class Name is useful for identifying multiple elements with the same class

  • Locators can be used with findElement() and findElements() methods

  • Example: driver.findElement(By.id("username"));

Q122. Write SQL query to delete duplicate records

Ans.

SQL query to delete duplicate records

  • Use the DELETE statement with a subquery to identify and delete duplicate records

  • The subquery should select the duplicate records based on the columns that define uniqueness

  • Use the ROW_NUMBER() function to assign a unique number to each row, and delete rows with a number greater than 1

Q123. write a code to take screen shot? write a code to print all the values from dropdown of selected type? write a code for implicit wait?

Ans.

Code snippets for taking a screenshot, printing dropdown values, and implementing implicit wait in automation testing.

  • For taking a screenshot: Use Selenium's TakesScreenshot interface to capture the screenshot and save it to a file.

  • For printing dropdown values: Use Selenium's Select class to select the dropdown element and then iterate through all options to print their values.

  • For implicit wait: Use Selenium's WebDriverWait class with a specified timeout to wait for elements ...read more

Q124. what is extension of eslint file and how do you combine rules in eslint

Ans.

Eslint file extension is .eslintrc.js and rules can be combined using extends property

  • Eslint file extension is .eslintrc.js

  • Rules can be combined using the 'extends' property in the eslint configuration file

  • For example, to combine rules from multiple eslint configurations, you can use: 'extends: ['eslint:recommended', 'plugin:react/recommended']

Q125. What is your framework, and how is it used in software development?

Ans.

My framework is a combination of tools, libraries, and guidelines used to develop and execute automated tests efficiently.

  • My framework includes tools like Selenium for web automation and Appium for mobile automation.

  • It also includes libraries like TestNG for test execution and reporting.

  • Guidelines in my framework help in structuring tests, handling test data, and maintaining code reusability.

  • For example, I use Page Object Model design pattern to separate test logic from page ...read more

Q126. What is method overloading and overriding and how you implement in your project

Ans.

Method overloading is having multiple methods in the same class with the same name but different parameters. Method overriding is having a method in a subclass with the same name and parameters as a method in its superclass.

  • Method overloading is achieved by defining multiple methods with the same name but different parameters in the same class.

  • Method overriding is achieved by creating a method in a subclass with the same name and parameters as a method in its superclass, and ...read more

Q127. Text cases for your projects and how do you test your projects

Ans.

I create test cases based on project requirements and use automation tools to test the projects.

  • Identify test scenarios based on project requirements

  • Create test cases for positive and negative scenarios

  • Use automation tools like Selenium or Appium to execute test cases

  • Analyze test results and report any issues found

Q128. What is POM? What is Maven?

Ans.

POM stands for Page Object Model. Maven is a build automation tool.

  • POM is a design pattern used in test automation to create an object repository for web UI elements.

  • It helps in reducing code duplication and improves code maintainability.

  • Maven is a popular build automation tool used for managing dependencies and building Java projects.

  • It uses a pom.xml file to define project dependencies and configurations.

  • Maven can also be used for running tests and generating reports.

Q129. what is the TestNG tool and when we are using this tool to test

Ans.

TestNG is a testing framework designed for unit testing and integration testing in Java.

  • TestNG is used for writing and running tests in Java programming language.

  • It supports annotations like @Test, @BeforeMethod, @AfterMethod for test configuration.

  • TestNG allows grouping of test cases, prioritizing tests, and parallel execution.

  • It generates detailed test reports and supports data-driven testing.

  • TestNG can be integrated with build tools like Maven and Jenkins for continuous in...read more

Q130. What is selenium wait. Explain how will you handle AJAX calls

Ans.

Selenium wait is used to pause the execution of the test script for a specified amount of time. Handling AJAX calls involves using explicit waits to ensure the page is fully loaded before interacting with elements.

  • Use WebDriverWait in Selenium to wait for a specific condition to be met before proceeding with the test

  • Use ExpectedConditions to wait for elements to be present, visible, clickable, etc.

  • Handle AJAX calls by waiting for the presence of a specific element that indica...read more

Q131. what are the different http codes used in rest assure?

Ans.

Different HTTP codes used in Rest Assured

  • 200 - OK: Request was successful

  • 201 - Created: Request was successful and a new resource was created

  • 400 - Bad Request: Request was invalid

  • 401 - Unauthorized: Request requires user authentication

  • 404 - Not Found: Requested resource was not found

  • 500 - Internal Server Error: Server encountered an unexpected condition

Q132. How to link TestNG file in Maven POM

Ans.

To link TestNG file in Maven POM, add the TestNG dependency and plugin in POM.xml

  • Add TestNG dependency in POM.xml

  • Add TestNG plugin in POM.xml

  • Configure TestNG plugin to run the TestNG XML file

  • Example: org.testng testng 7.4.0 org.apache.maven.plugins maven-surefire-plugin 3.0.0-M5 testng.xml

Q133. How to run and write test cases using testNg

Ans.

TestNG is a testing framework that allows running and writing test cases in Java.

  • Create a TestNG XML file with test suite and test cases

  • Write test methods with annotations like @Test, @BeforeMethod, @AfterMethod

  • Use assertions to verify expected results

  • Run tests using TestNG runner or Maven plugin

Q134. what is feature and step definitions in cucumber BDD

Ans.

Feature files contain high-level description of the functionality to be tested, while step definitions are the implementation of the steps in the feature file using code.

  • Feature files are written in Gherkin syntax and describe the behavior of the application in plain text.

  • Step definitions are written in programming languages like Java, Ruby, etc., and map the steps in the feature file to automation code.

  • Feature files and step definitions together form the basis of Behavior Dr...read more

Q135. Difference between regression and retesting?

Ans.

Regression testing is testing the entire application after making changes, while retesting is testing only the failed test cases.

  • Regression testing is done to ensure that the changes made to the application have not affected the existing functionality.

  • Retesting is done to ensure that the defects found in the previous testing cycle have been fixed.

  • Regression testing is time-consuming and requires a lot of resources.

  • Retesting is less time-consuming and requires fewer resources....read more

Q136. how can we convert array to arraylist

Ans.

Use Arrays.asList() method to convert array to ArrayList.

  • Use Arrays.asList() method to convert array to ArrayList.

  • Example: String[] array = {"apple", "banana", "orange"}; ArrayList list = new ArrayList<>(Arrays.asList(array));

Q137. how can you avoid merge conflicts in git

Ans.

To avoid merge conflicts in git, use branches effectively, communicate with team members, and regularly pull changes from the remote repository.

  • Create feature branches for each new feature or bug fix

  • Regularly pull changes from the remote repository to stay up to date with the latest changes

  • Communicate with team members about the files you are working on to avoid conflicting changes

  • Use tools like git rebase to integrate changes from one branch to another without creating unnec...read more

Q138. What kind of bugs you will encounter in API testing

Ans.

Common bugs in API testing include incorrect data formats, authentication issues, and performance problems.

  • Incorrect data formats such as missing or incorrect parameters

  • Authentication issues like invalid tokens or permissions

  • Performance problems such as slow response times or timeouts

Q139. Which method you use to remove spaces in the string

Ans.

One method to remove spaces in a string is by using the replace() method in JavaScript.

  • Use the replace() method with a regular expression to replace all spaces with an empty string

  • Example: str.replace(/\s/g, '') will remove all spaces from the string 'hello world'

  • Another method is to use the split() method to split the string by spaces and then join the array elements without spaces

Q140. What is difference between authorization and authentication?

Ans.

Authentication verifies the identity of a user, while authorization determines what a user can access.

  • Authentication confirms the user's identity through credentials like username and password.

  • Authorization determines the user's permissions and access levels once authenticated.

  • Authentication is the process of validating a user's identity, while authorization is the process of determining what actions a user is allowed to perform.

  • Example: Logging into a system with a username ...read more

Q141. Can we create object for abstract classes and interfaces?

Ans.

Yes, we can create object for abstract classes and interfaces in Java.

  • Objects cannot be created for abstract classes directly, but can be created for concrete subclasses that extend the abstract class.

  • Interfaces cannot be instantiated, but objects can be created for classes that implement the interface.

  • Example: Abstract class Animal { abstract void makeSound(); } Class Dog extends Animal { void makeSound() { System.out.println('Bark'); } } Animal obj = new Dog();

  • Example: Inte...read more

Q142. Is cucumber a testing tool?

Ans.

No, Cucumber is not a testing tool.

  • Cucumber is a tool used for behavior-driven development (BDD) and not specifically for testing.

  • It allows non-technical stakeholders to understand and collaborate on the development process.

  • Cucumber uses a plain-text format called Gherkin to describe the behavior of an application.

  • It acts as a bridge between the business and technical teams, facilitating communication and ensuring that the software meets the desired behavior.

  • Cucumber can be i...read more

Q143. what is static keyword?

Ans.

Static keyword is used to declare a variable or method that belongs to the class rather than an instance of the class.

  • Static variables are shared among all instances of a class

  • Static methods can be called without creating an instance of the class

  • Static blocks are used to initialize static variables

  • Static keyword can also be used to create nested classes

  • Example: public static int count = 0;

Frequently asked in,

Q144. how to find color of webelement in selenium

Ans.

To find the color of a webelement in Selenium, use the getCssValue() method.

  • Locate the webelement using any of the available locators in Selenium

  • Use the getCssValue() method to get the value of the CSS property 'color'

  • The value returned will be in the format 'rgba(255, 0, 0, 1)'

  • Use any color picker tool to convert the RGB value to the corresponding color name

Q145. What is Inheritance? Polymorphism?

Ans.

Inheritance is a mechanism in object-oriented programming where a class inherits properties and behaviors from another class. Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • Inheritance allows for code reusability by defining a new class based on an existing class.

  • Polymorphism enables flexibility in programming by allowing objects to be treated as instances of their parent class.

  • Example of inheritance: Class B inheriting from C...read more

Q146. 1-Framework Explanation(how to design)

Ans.

Framework design involves creating a structured approach to automate testing.

  • Identify the testing requirements and objectives

  • Choose a suitable automation tool

  • Create a modular and reusable code structure

  • Implement error handling and reporting mechanisms

  • Integrate with version control and continuous integration systems

  • Ensure scalability and maintainability

  • Examples: Keyword-driven, Data-driven, Hybrid frameworks

Q147. How fast you can learn new technology and Process and what is your strategy to improve ROI very fast

Ans.

I have a proven track record of quickly learning new technologies and processes, with a focus on maximizing ROI.

  • I prioritize understanding the fundamentals of the new technology or process before diving into details

  • I leverage online resources, tutorials, and documentation to accelerate my learning curve

  • I seek guidance and mentorship from experienced professionals in the field to gain insights and best practices

  • I set clear goals and milestones to measure my progress and ensure...read more

Q148. Run only failed test cases from all.

Ans.

To run only failed test cases, we can use testNG or JUnit annotations and configure the test suite accordingly.

  • Use testNG or JUnit annotations to mark the test cases as failed or passed

  • Configure the test suite to run only failed test cases

  • Use tools like Jenkins to automate the process

  • Example: @Test(enabled = true, retryAnalyzer = RetryAnalyzer.class) public void testMethod() {}

  • Example:

Q149. What is bug life cycle?

Ans.

Bug life cycle is the process of identifying, reporting, resolving, and verifying software defects.

  • Bug is identified by testers or users

  • Bug is reported to the development team

  • Development team resolves the bug

  • Bug fix is verified by testers

  • Bug is closed if verified or reopened if not

  • Bug life cycle stages include new, open, assigned, resolved, verified, and closed

Q150. Explain collection hierarchi 2. given goibibo site url and asked to find search bar table content etc.3)reverse string coding question 4. selenium basic questions. java oops

Ans.

Collection hierarchy in Java refers to the relationship between different types of collections such as List, Set, and Map.

  • Java collections framework includes interfaces like Collection, List, Set, and Map.

  • List interface extends Collection interface and represents an ordered collection of elements.

  • Set interface extends Collection interface and represents a collection of unique elements.

  • Map interface represents a mapping between keys and values.

Previous
1
2
3
4
5
6
7
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.4k Interviews
3.8
 • 8.1k Interviews
3.6
 • 7.5k Interviews
3.7
 • 5.6k Interviews
3.8
 • 5.6k Interviews
3.7
 • 4.7k Interviews
3.8
 • 2.9k Interviews
4.0
 • 2.3k Interviews
3.4
 • 788 Interviews
3.7
 • 533 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Automation Test Engineer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter