Automation Test Engineer
700+ Automation Test Engineer Interview Questions and Answers

Asked in Xoriant

Q. Why am I getting an elementNotPresent exception even when the element is present on the page? Please explain.
ElementNotPresent exception occurs even if element is present on page. Why?
The element may not be loaded yet, so wait for it to load before checking
The element may be hidden or not visible on the page
The element may have a different name or ID than expected
The element may be in an iframe or shadow DOM
The element may have been removed or deleted from the page

Asked in Mphasis

Q. Can you create a static local variable inside a static method?
Yes, a static local variable can be created inside a static method.
Yes, a static local variable can be declared inside a static method in programming languages like C++.
Static local variables retain their values between function calls.
Example: static void myStaticMethod() { static int count = 0; count++; }

Asked in Capgemini

Q. How do you insert a value into a text box using an Excel sheet through Selenium?
To insert value in text box using excel sheet through Selenium, we need to read data from excel and use sendKeys() method.
Read data from excel using Apache POI or JXL library
Identify the text box element using Selenium
Use sendKeys() method to insert the value from excel into the text box

Asked in Capgemini

Q. What is agile methodology? What is CI CD pipe line?
Agile methodology is an iterative approach to software development that emphasizes collaboration, flexibility, and customer satisfaction. CI/CD pipeline is a set of practices that automate the process of building, testing, and deploying software.
Agile methodology involves breaking down a project into smaller, more manageable pieces called sprints.
Each sprint involves a cross-functional team working together to deliver a working product increment.
CI/CD pipeline involves contin...read more

Asked in Tech Mahindra

Q. How do you configure Jenkins to point to a branch other than the master branch?
To point to any other branch in Jenkins, use the 'Branch specifier' field in the 'Source Code Management' section.
In the Jenkins job configuration, go to the 'Source Code Management' section
Select the appropriate SCM tool (e.g. Git, SVN)
In the 'Branch specifier' field, enter the name of the branch you want to point to (e.g. 'develop', 'feature/xyz')
Save the configuration and run the job

Asked in AlgoShack

Q. Automation * Taking Screenshots * Difference b/w selenium 3 & 4 * Selenium components * Frameworks & examples * Parallel execution
The question is about automation testing, specifically focusing on taking screenshots, the differences between Selenium 3 and 4, Selenium components, frameworks and examples, and parallel execution.
Taking screenshots is a common practice in automation testing to capture the state of the application at a specific point in time.
Selenium 3 and 4 are different versions of the Selenium automation framework, with version 4 introducing new features and improvements.
Selenium componen...read more
Automation Test Engineer Jobs




Asked in TCS

Q. Which JavaScript commands have you used in Selenium?
I have used various javascript commands in Selenium such as executeScript, executeAsyncScript, etc.
executeScript() method is used to execute JavaScript code in the context of the currently selected frame or window.
executeAsyncScript() method is used to execute asynchronous JavaScript code in the context of the currently selected frame or window.
Other commonly used JavaScript commands in Selenium include getElementById(), getElementsByClassName(), etc.

Asked in Cognizant

Q. What are some popular tools used for automation testing?
Popular tools for automation testing include Selenium, Appium, JMeter, and TestComplete.
Selenium: widely used for web application testing
Appium: used for mobile application testing
JMeter: used for load testing and performance testing
TestComplete: used for desktop application testing
Other popular tools include Katalon Studio, Robot Framework, and Cucumber
Share interview questions and help millions of jobseekers 🌟

Asked in Globant

Q. How do you scroll on a mobile device using automation?
Scrolling in mobile can be done using swipe or touch actions.
Use swipe or touch actions to scroll in mobile automation
For swipe action, use swipe method with start and end coordinates
For touch action, use press and move methods with start and end coordinates
Example: driver.swipe(startX, startY, endX, endY, duration)
Example: TouchAction(driver).press(startX, startY).moveTo(endX, endY).release().perform()

Asked in Capgemini

Q. How will you track tasks in Jira?
To track tasks in Jira, I will create issues, assign them to team members, set priorities, and update their status.
Create issues in Jira for each task
Assign the issues to team members
Set priorities for each issue
Update the status of each issue as it progresses
Use Jira's reporting features to track progress and identify bottlenecks

Asked in Capgemini

Q. What do you mean by automation testing?
Automation testing refers to the use of software tools to execute pre-scripted tests on a software application.
Automation testing involves writing scripts to automate repetitive manual testing tasks
It helps in reducing the time and effort required for testing
It improves the accuracy and reliability of testing results
Examples of automation testing tools include Selenium, Appium, and TestComplete

Asked in Tech Mahindra

Q. What is the design pattern used in your framework?
I don't have the available data to answer this question.
N/A

Asked in Tech Mahindra

Q. Write an SQL query to get the 10th highest salary from the employee table.
SQL query to get the 10th highest salary from employee table
Use ORDER BY and LIMIT clauses
Subquery can be used to get the 10th highest salary

Asked in Coforge

Q. 1. Explain encapsulation, abstraction 2. Selenium locate dropdown question 3. Appium configuration questions
Interview questions for Automation Test Engineer on encapsulation, abstraction, Selenium dropdown and Appium configuration.
Encapsulation is the process of hiding implementation details from the user.
Abstraction is the process of hiding unnecessary details from the user.
Selenium can locate dropdown using Select class and its methods.
Appium configuration questions may include setting up desired capabilities, specifying app path, device name, platform name, etc.

Asked in Globant

Q. How do you take a screenshot in Selenium?
To take a screenshot in Selenium, use the getScreenshotAs() method.
Create an object of the TakesScreenshot interface
Use the getScreenshotAs() method to capture the screenshot
Save the screenshot to a desired location using the File class

Asked in Tech Mahindra

Q. What is abstraction, and what are the differences between an interface and an abstract class?
Abstraction is a way of hiding implementation details. An interface is a contract that specifies the behavior of a class.
Abstraction is achieved through abstract classes and interfaces
Abstract classes can have both abstract and non-abstract methods
Interfaces can only have abstract methods and constants
A class can implement multiple interfaces but can only inherit from one abstract class
Abstract classes can have constructors but interfaces cannot
Example: An abstract class 'Ani...read more

Asked in Tech Mahindra

Q. What is Maven and explain its structure?
Maven is a build automation tool used primarily for Java projects.
Maven uses a Project Object Model (POM) to manage dependencies and build process
It uses a central repository to download dependencies
Maven has a defined directory structure for projects
Plugins can be added to extend Maven's functionality

Asked in Hexaware Technologies

Q. Write a program to count the number of integers and characters in a given string. Input: "nAJh4837sj"
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.

Asked in Netcracker Technology

Q. Given a string input = "Achiever2025," how can you separate the alphabets and digits from the input?
Separate alphabets and digits from a given string input.
Iterate through each character in the input string
Check if the character is a letter or a digit using built-in functions like isalpha() and isdigit()
Create separate arrays for alphabets and digits and store the characters accordingly

Asked in Netcracker Technology

Q. What is the significance of the public static void main(String arv[]) method in Java?
The public static void main(String arv[]) method is the entry point of a Java program, where execution begins.
The 'public' keyword allows the method to be accessed from outside the class.
The 'static' keyword allows the method to be called without creating an instance of the class.
The 'void' keyword indicates that the method does not return any value.
The 'main' method is the starting point of execution for a Java program.
The 'String[] args' parameter allows command-line argume...read more

Asked in TCS

Q. What are all the exceptions that you know in selenium and define real time exam which situation does exception occur?
Some exceptions in Selenium are NoSuchElementException, TimeoutException, StaleElementReferenceException.
NoSuchElementException occurs when an element is not found in the DOM.
TimeoutException occurs when a command takes longer than the timeout value to complete.
StaleElementReferenceException occurs when a referenced element is no longer attached to the DOM.

Asked in Cigniti Technologies

Q. Write a Java program to find the maximum profit from buying and selling books given an array of book prices for each day of the week. You can buy a book on any day and sell it on any subsequent day.
Java program to find maximum profit from buying and selling books on different days.
Create an array to store the prices of books on different days
Iterate through the array to find the maximum profit by buying on one day and selling on another
Calculate profit by subtracting buying price from selling price
Return the maximum profit obtained

Asked in Infosys

Q. What are the challenges of using Selenium?
Challenges in Selenium include browser compatibility, dynamic elements, and test maintenance.
Browser compatibility issues can arise due to differences in browser versions and configurations.
Dynamic elements can cause tests to fail if not handled properly.
Test maintenance can be challenging due to changes in the application under test.
Synchronization issues can occur when the test script runs faster than the application.
Handling pop-ups and alerts can be tricky.
Cross-domain te...read more

Asked in Pixel

Q. What automation frameworks have you used in your projects?
We used a hybrid automation framework that combined data-driven and keyword-driven approaches.
The framework was built using Selenium WebDriver and TestNG.
We used Excel sheets to store test data and Apache POI library to read/write data from/to Excel.
The framework had reusable functions and libraries for common actions like login, logout, etc.
We also used Jenkins for continuous integration and execution of automated tests.
The framework was designed to be scalable and maintaina...read more

Asked in Infosys

Q. How do you handle broken links in Selenium?
To handle broken links in Selenium, we can use the HTTPURLConnection class to check the response code of the link.
Get all the links on the page using findElements() method
Iterate through each link and get the href attribute
Create a URL object for the href attribute
Open a connection using HTTPURLConnection class
Get the response code using getResponseCode() method
If the response code is not 200, mark the link as broken

Asked in AlphaSense

Q. How would you implement login functionality with multiple credentials stored in an Excel sheet?
Multiple credentials can be logged in using data from an excel sheet.
Read the excel sheet using a library like Apache POI
Iterate through the rows and columns to get the data
Use a loop to login with each set of credentials
Assert the login success or failure for each set of credentials

Asked in Mphasis

Q. What is the memory allocation for a String?
String memory allocation is dynamic and depends on the length of the string.
String memory allocation is dynamic and can change based on the length of the string.
In Java, a String object is stored in the heap memory.
Each character in a String typically takes up 2 bytes of memory.
String objects in Java are immutable, meaning once a String object is created, it cannot be changed.

Asked in LTIMindtree

Q. Write a program to print all even numbers in an array in the format: {2,4,6}.
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.

Asked in Capgemini

Q. How would you take a backup of a table and insert the values into the same table in another database?
To take backup of a table and insert values in the same table of another database.
Use SQL Server Management Studio to take backup of the table
Restore the backup in the target database
Use SQL queries to insert values from source table to target table

Asked in LTIMindtree

Q. What is the difference between an abstract class and an abstract method?
Abstract class is a class that cannot be instantiated while abstract method is a method without implementation.
Abstract class can have both abstract and non-abstract methods while abstract method can only exist in an abstract class or interface.
Abstract class can have constructors while abstract method cannot.
Abstract class can provide default implementation for its non-abstract methods while abstract method cannot.
Example of abstract class: Animal class with abstract method ...read more
Interview Questions of Similar Designations
Interview Experiences of Popular Companies





Top Interview Questions for Automation Test Engineer Related Skills



Reviews
Interviews
Salaries
Users

