Qa Automation Testing Engineer

100+ Qa Automation Testing Engineer Interview Questions and Answers

Updated 10 May 2025
search-icon

Q1. selenium: what are selenium components, what are the different locators in selenium, what is selenium web driver, write a xpath for a given element on a web page

Ans.

Selenium components include Selenium IDE, Selenium RC, Selenium WebDriver. Different locators are ID, Name, Class Name, Tag Name, Link Text, Partial Link Text, CSS Selector and XPath. Selenium WebDriver is a tool used to automate web application testing. XPath is a language used to navigate through XML documents and web pages.

  • Selenium components: Selenium IDE, Selenium RC, Selenium WebDriver

  • Different locators: ID, Name, Class Name, Tag Name, Link Text, Partial Link Text, CSS ...read more

Q2. How do you convert a JSON object to a string and vice versa?

Ans.

To convert JSON object to string, use JSON.stringify(). To convert string to JSON object, use JSON.parse().

  • JSON.stringify() method converts a JavaScript object or value to a JSON string.

  • JSON.parse() method parses a JSON string and returns a JavaScript object.

  • Example: var obj = {name: 'John', age: 30}; var jsonString = JSON.stringify(obj); var jsonObj = JSON.parse(jsonString);

  • Make sure the JSON string is valid, else it will throw an error.

Qa Automation Testing Engineer Interview Questions and Answers for Freshers

illustration image

Q3. Write a program to find the elements of a list that have the least difference in Python. Input: [3,9,50,15,99,7,98,65]. Expected output: [98,99]

Ans.

Program to find elements of a list with least difference in Python

  • Sort the list

  • Find the minimum difference between adjacent elements

  • Return the elements with minimum difference

Q4. Robot Framework : what are standard libraries in Robot Framework? Explain robot framework architechture, what is setup and teardown, write a sample login script using robot framework?

Ans.

Answering questions related to Robot Framework and its standard libraries, architecture, setup and teardown, and a sample login script.

  • Standard libraries in Robot Framework include BuiltIn, Collections, DateTime, Dialogs, OperatingSystem, Process, Screenshot, String, Telnet, and XML.

  • Robot Framework architecture consists of test cases, test suites, and keywords.

  • Setup and teardown are pre and post conditions for test cases.

  • Sample login script using Robot Framework:

  • Open Browser ...read more

Are these interview questions helpful?

Q5. what are the locators in selenium? what is the difference between driver.quit and drive.close? What is implicit wait and explicit wait ?

Ans.

Answers to common Selenium interview questions.

  • Locators in Selenium are used to identify web elements on a web page. Examples include ID, class name, name, tag name, link text, and partial link text.

  • driver.quit() closes the entire browser window and ends the WebDriver session, while driver.close() only closes the current window or tab.

  • Implicit wait is a global wait that applies to all web elements and waits for a specified amount of time before throwing an exception if the el...read more

Q6. 4- Selenium questions- list vs set, findelement vs findelements, Actions class, write syntax for actions class, implict wait and explict wait

Ans.

Selenium questions covering list vs set, findelement vs findelements, Actions class, implicit wait, and explicit wait.

  • List vs Set: List allows duplicate elements and maintains insertion order, while Set does not allow duplicates.

  • findElement vs findElements: findElement returns the first matching element, findElements returns a list of all matching elements.

  • Actions class: Used for performing complex user interactions like drag-and-drop, mouse movements, etc.

  • Syntax for Actions ...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. What are lists and their functions?

Ans.

Lists are a collection of ordered and changeable elements. They have various functions to manipulate the data.

  • Lists are created using square brackets []

  • They can contain any data type such as strings, integers, or even other lists

  • Functions include append(), insert(), remove(), pop(), sort(), and reverse()

  • Example: my_list = ['apple', 'banana', 'cherry']

  • Example: my_list.append('orange') adds 'orange' to the end of the list

Q8. What is ARP? How it will work? Can we able to delete the ARP entry? And What is the command? How long the ARP entry will be there in table? What is ARP Poisoning?

Ans.

ARP stands for Address Resolution Protocol. It is used to map IP addresses to MAC addresses on a local network.

  • ARP is used to resolve IP addresses to MAC addresses on a local network.

  • ARP works by broadcasting a request for the MAC address of a specific IP address on the network.

  • Yes, ARP entries can be deleted using the 'arp -d' command.

  • ARP entries have a timeout period, typically around 2 minutes, after which they are removed from the ARP table.

  • ARP Poisoning is a type of atta...read more

Qa Automation Testing Engineer Jobs

Qa Automation Testing Engineer 5-8 years
Winjit Technologies
3.7
Hyderabad / Secunderabad
Qa Automation Testing Engineer 5-8 years
Akshay Software Technologies
4.0
₹ 7 L/yr - ₹ 9 L/yr
Mumbai
QA Automation Testing Engineer 6-11 years
Covalense Technologies Private Limited
3.2
Bangalore / Bengaluru

Q9. What is the process to find duplicate names from a string array and print those that start with the letter 'B'?

Ans.

Identify and print duplicate names from a string array that start with 'B'.

  • 1. Create a string array with names, e.g., ['Bob', 'Alice', 'Bill', 'Bob', 'Bobby'].

  • 2. Use a HashMap or dictionary to count occurrences of each name.

  • 3. Iterate through the array and check for names starting with 'B'.

  • 4. Print names that have a count greater than 1, e.g., 'Bob' and 'Bill' if they are duplicates.

Q10. How do you verify that every step in a test case has a corresponding step definition?

Ans.

To check if every step has a corresponding step definition, we can use a code coverage tool.

  • Use a code coverage tool to analyze the step definition file and identify any missing steps

  • Ensure that all steps in the feature file are covered by the step definition file

  • Regularly review and update the step definition file to ensure it stays up-to-date with the feature file

Q11. 8- agile process, what is user story, what is sprint

Ans.

User story is a description of a feature from an end-user perspective, and sprint is a time-boxed iteration in Agile development.

  • User story is a short, simple description of a feature told from the perspective of the person who desires the new capability.

  • Sprint is a time-boxed iteration in Agile development, usually lasting 1-4 weeks, where a team works on a set of user stories.

  • User stories are written in a specific format: 'As a [type of user], I want [some goal] so that [so...read more

Q12. If you are not meeting the requirement in your test case, what documentation format do you follow?

Ans.

If not meeting requirement in testcase, follow documentation format like updating test case steps, expected results, and defect details.

  • Update the test case steps to accurately reflect the actual steps taken during testing

  • Update the expected results to reflect the actual results observed during testing

  • Document the defect details including steps to reproduce, screenshots, and any additional information

  • Assign a severity and priority to the defect based on its impact on the syst...read more

Q13. What is the output of the following Java code? public class Test { public static void main(String[] args) { int I = 0; try { throw new NullPointerException(); // Exception is thrown } catch (Exception e) { I++;...

read more
Ans.

The code demonstrates exception handling, resulting in an output of 2 due to incrementing variable I in catch and finally blocks.

  • The code throws a NullPointerException which is caught in the catch block.

  • In the catch block, I is incremented from 0 to 1.

  • The finally block executes regardless of exception, incrementing I from 1 to 2.

  • The final output printed is the value of I, which is 2.

Q14. Java program to compare 2 strings and check if both matching Selenium Code for Drag and Drop images Selenium code for selecting all the elements from the dropdown Java concepts: OOPs, Inheritance(Multiple inher...

read more
Ans.

The interview question covers Java programming, Selenium automation, OOPs concepts, and testing concepts.

  • Use equals() method in Java to compare two strings for exact match

  • Use dragAndDrop() method in Selenium for drag and drop functionality

  • Use Select class in Selenium for handling dropdowns

  • OOPs concepts include encapsulation, inheritance, polymorphism, and abstraction

  • Selenium waits can be implemented using WebDriverWait class

  • Regression testing ensures that new code changes do ...read more

Q15. Have you worked with custom exceptions? What exceptions have you encountered, and can you explain what a StaleElementReferenceException is?

Ans.

Custom exceptions enhance error handling in automation testing, while StaleElementReferenceException indicates a DOM element is no longer valid.

  • Custom Exceptions: These are user-defined exceptions that allow developers to create specific error handling scenarios tailored to their application needs.

  • Common Exceptions: In automation testing, I've encountered exceptions like NoSuchElementException, TimeoutException, and StaleElementReferenceException.

  • StaleElementReferenceExceptio...read more

Q16. How to check network connectivity speed? And how will you debug? How can you increase the frames size and how to capture the frames?

Ans.

To check network connectivity speed, use tools like speedtest.net. Debug by checking for network congestion or hardware issues. Increase frame size by adjusting MTU. Capture frames using tools like Wireshark.

  • Use tools like speedtest.net to check network connectivity speed

  • Debug by checking for network congestion, hardware issues, or misconfigured settings

  • Increase frame size by adjusting Maximum Transmission Unit (MTU)

  • Capture frames using tools like Wireshark for packet analysi...read more

Q17. What is the SQL query to select and display the name of the person who has the highest salary among employees?

Ans.

SQL query to select and display the name of person with highest salary among employees.

  • Use the MAX() function to find the highest salary

  • Join the employee table with the salary table using a common key like employee_id

  • Select the name of the person with the highest salary

Q18. Which estimation technique do you follow? If you use Fibonacci, why is it in the sequence 1, 2, 3, 5, 8, 13?

Ans.

Fibonacci sequence is a mathematical pattern where each number is the sum of the two preceding ones.

  • Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones.

  • The sequence starts with 1, 2, then each subsequent number is the sum of the two previous numbers (1+2=3, 2+3=5, 3+5=8, and so on).

  • This sequence is used in estimating because it reflects natural growth patterns found in nature.

Q19. What are the severity and priority if a logo was changed in the application?

Ans.

Severity and Priority of changing a logo in an application

  • Severity refers to the impact of the logo change on the application's functionality

  • Priority determines the order in which the logo change should be addressed

  • Example: If the logo change affects the application's branding and user recognition, it may have high severity and priority

Q20. What is VLAN and how does it work? Explain with a scenario.

Ans.

VLAN stands for Virtual Local Area Network, used to logically segment a network into multiple virtual networks.

  • VLANs help in improving network security by isolating traffic between different departments or groups.

  • They can also help in optimizing network performance by reducing broadcast traffic.

  • VLANs are configured at the switch level and allow devices in different VLANs to communicate with each other based on routing rules.

  • For example, in a company network, VLANs can be set ...read more

Q21. Write a Python program to move all zeros to the end of a list. For example, given the input list [12, 83, 0, 17, 0, 71], the output should be [12, 83, 17, 71, 0, 0].

Ans.

Python program to move all zeros to the end of a list while maintaining the order of non-zero elements.

  • Iterate through the input list and separate non-zero elements into one list and zeros into another list.

  • Concatenate the non-zero list with the zero list to get the desired output.

  • Print the final list with zeros at the end.

Q22. What is the difference between RIP and OSPF? Explain me OSPF?

Ans.

RIP is a distance vector routing protocol while OSPF is a link-state routing protocol. OSPF uses Dijkstra algorithm for routing.

  • RIP stands for Routing Information Protocol and OSPF stands for Open Shortest Path First.

  • RIP uses hop count as the metric for path selection while OSPF uses cost.

  • OSPF is more scalable and efficient than RIP as it converges faster and supports VLSM.

  • OSPF uses areas to divide the network into smaller domains for better management and reduced routing tra...read more

Q23. Can you tell me how to fetch data from a table row dynamically?

Ans.

To fetch data from a table row dynamically, use a unique identifier to locate the row and extract the data.

  • Identify a unique identifier for the row, such as an ID or class name

  • Use a query selector or XPath to locate the row based on the identifier

  • Extract the data from the row using appropriate methods or functions

Q24. Have you created a test plan document at the start of a project?

Ans.

Yes, I have created the test plan document at the start of the project.

  • Yes, I always create a test plan document at the beginning of a project to outline the testing approach and strategy.

  • The test plan document includes details on scope, objectives, resources, schedule, and test cases.

  • It helps in ensuring that all stakeholders are aligned on the testing process and expectations.

  • For example, in my previous project, I created a detailed test plan document that was reviewed and ...read more

Q25. Sorting of hashmap using keys without any method. xpath for list of webelements in PageFactory. TARGET folder in maven Data Table in cucumber.

Ans.

Sorting a hashmap using keys without any method involves iterating through the keys and rearranging them in ascending order.

  • Iterate through the keys of the hashmap

  • Compare each key with the next key and swap them if they are in the wrong order

  • Continue this process until all keys are in ascending order

Q26. What is the difference between Cisco switch and other company switches? What is the difference between cisco switch and white box switch?

Ans.

Cisco switches are known for their reliability, advanced features, and high price point compared to other company switches.

  • Cisco switches are known for their high quality and reliability.

  • Cisco switches offer advanced features such as VLAN support, QoS, and security options.

  • Cisco switches are typically more expensive than switches from other companies.

  • White box switches are generic, off-the-shelf switches that are not branded by a specific company.

  • White box switches are often ...read more

Q27. What is the background of Behavior Driven Development (BDD)?

Ans.

BDD is a software development approach that enhances collaboration between developers, testers, and non-technical stakeholders.

  • Originated from Test Driven Development (TDD) to improve communication.

  • Focuses on defining behavior in simple language, often using Gherkin syntax.

  • Encourages collaboration through examples and scenarios, e.g., 'Given a user is logged in, when they click logout, then they should see the login page.'

  • Tools like Cucumber and SpecFlow facilitate BDD by all...read more

Q28. What is the difference between regression testing and smoke testing?

Ans.

Regression testing checks existing features after changes, while smoke testing verifies basic functionality post-deployment.

  • Regression testing ensures that new code changes do not adversely affect existing functionalities.

  • Smoke testing is a preliminary test to check if the basic functions of an application work.

  • Example of regression testing: After a new feature is added, testing all existing features to ensure they still work.

  • Example of smoke testing: After a new build is dep...read more

Q29. What modules have you worked on in ERP systems?

Ans.

I have worked on multiple modules of ERPs including finance, inventory, and human resources.

  • Finance module: Managed financial transactions, budgeting, and reporting.

  • Inventory module: Handled stock management, procurement, and order fulfillment.

  • Human resources module: Oversaw employee information, payroll, and performance management.

Q30. What technologies have you used in your test cases?

Ans.

I have used technologies like Selenium, JUnit, TestNG, Cucumber, and Jenkins in my testcases.

  • Selenium

  • JUnit

  • TestNG

  • Cucumber

  • Jenkins

Q31. What is the process for using Google Maps within the Playwright framework?

Ans.

Integrating Google Maps in Playwright involves simulating user interactions and verifying map functionalities in web applications.

  • Install Playwright: Use npm to install Playwright in your project with `npm install playwright`.

  • Launch Browser: Use Playwright to launch a browser instance, e.g., `const browser = await chromium.launch();`.

  • Navigate to Google Maps: Use `page.goto('https://www.google.com/maps');` to navigate to Google Maps.

  • Interact with Map: Simulate interactions lik...read more

Q32. Build an automated script that navigates to Facebook, logs in with invalid credentials, and verifies the error message using the page object model.

Ans.

Automate script to navigate to Facebook, login with invalid credentials, and verify error message using page object model.

  • Create a page object model for Facebook login page

  • Use automation tool like Selenium to navigate to Facebook and enter invalid credentials

  • Verify error message displayed on the page using assertions

Q33. Can you provide a ReadyAPI Groovy script code sample demonstrating how to retrieve test data?

Ans.

Using Ready API Groovy script to retrieve test data

  • Use the testRunner object to access test data

  • Retrieve test data using testRunner.testCase.getPropertyValue('propertyName')

  • Store the retrieved test data in a variable for further use

Q34. What is ICMP and how it will work? How ping works?

Ans.

ICMP stands for Internet Control Message Protocol. It is used for network troubleshooting and diagnostic purposes.

  • ICMP is a protocol used by network devices to communicate error messages or operational information.

  • Ping is a tool that uses ICMP to send echo requests to a target host and waits for an echo reply.

  • Ping works by sending an ICMP echo request packet to the target host, which then responds with an echo reply if it is reachable.

  • ICMP can also be used for other purposes ...read more

Q35. 3-Java program to reverse string, check palindrome

Ans.

Java program to reverse string and check if it is a palindrome.

  • Create a function to reverse the input string.

  • Compare the reversed string with the original string to check if it is a palindrome.

  • Use built-in functions like StringBuilder or StringBuffer for string manipulation.

  • Handle cases where input is null or empty.

Q36. What is the Robot Framework used for, and what are its key features?

Ans.

Robot Framework is an open-source automation framework for acceptance testing and robotic process automation, using keyword-driven testing.

  • Keyword-Driven Testing: Robot Framework uses a simple, human-readable syntax for writing test cases, allowing non-programmers to contribute easily.

  • Extensibility: It supports libraries written in Python or Java, enabling integration with various tools and technologies, such as Selenium for web testing.

  • Built-in Libraries: The framework comes...read more

Q37. How do you handle dropdowns using Selenium?

Ans.

Dropdowns in Selenium can be handled using Select class in Selenium WebDriver.

  • Use Select class from Selenium WebDriver to interact with dropdowns

  • Identify the dropdown element using its locator (id, name, class, etc.)

  • Create a Select object by passing the dropdown element as a parameter

  • Use Select object methods like selectByVisibleText(), selectByValue(), selectByIndex() to interact with dropdown options

Q38. what is sdlc? what is the difference between sdlc and stlc?

Ans.

SDLC stands for Software Development Life Cycle, while STLC stands for Software Testing Life Cycle.

  • SDLC is the process of developing software from planning to deployment, while STLC is the process of testing software within the SDLC.

  • SDLC includes phases like requirements gathering, design, development, testing, and deployment, while STLC focuses solely on testing activities.

  • SDLC is broader and encompasses the entire software development process, while STLC is specific to test...read more

Q39. what is cypress ,difference between cypress and selenium

Ans.

Cypress is a JavaScript-based end-to-end testing framework. It differs from Selenium in terms of architecture, ease of use, and speed.

  • Cypress is a JavaScript-based testing framework for web applications.

  • It provides a simple and intuitive API for writing tests.

  • Cypress runs directly in the browser and can access everything on the page.

  • Unlike Selenium, Cypress does not use WebDriver and has a different architecture.

  • Cypress offers automatic waiting for elements and actions, makin...read more

Q40. What do you mean by ERPs?

Ans.

ERPs stand for Enterprise Resource Planning systems.

  • ERPs are software systems that integrate and manage various business processes and functions.

  • They provide a centralized database and a suite of applications to streamline operations.

  • ERPs typically include modules for finance, human resources, supply chain management, and customer relationship management.

  • Examples of popular ERPs include SAP, Oracle ERP Cloud, and Microsoft Dynamics 365.

  • ERPs help organizations improve efficien...read more

Q41. What happens if the static keyword is removed from the main function?

Ans.

Removing static keyword from main function will not have any impact on the program's functionality.

  • Removing static keyword from main function will not affect the program's execution.

  • The main function in C/C++ is always called by the operating system, regardless of whether it is static or not.

  • Static keyword in main function is optional and does not change the behavior of the program.

Q42. What tags have you used in the runner class?

Ans.

In a runner class, tags help organize and filter test cases for execution in automation testing frameworks.

  • Tags are used to categorize tests, e.g., @smoke, @regression.

  • They allow selective execution, e.g., running only @smoke tests.

  • Tags can be combined, e.g., @regression and @critical.

  • In Cucumber, tags are specified in the feature file, e.g., @login.

  • In TestNG, tags can be implemented using groups in XML configuration.

Q43. Where have you used JavaScript, and why would you use it over web element methods?

Ans.

JavaScript is used in QA automation testing for handling dynamic elements, performing validations, and interacting with APIs.

  • JavaScript is used to handle dynamic elements on a webpage that cannot be easily accessed using web element methods.

  • JavaScript can be used to perform validations and assertions on the webpage, such as checking for the presence of certain elements or text.

  • JavaScript is also commonly used to interact with APIs and perform API testing in QA automation.

  • For ...read more

Q44. Write a program to print the occurrence of each character in a given string.

Ans.

The program will count and print the occurrence of each character in a given string.

  • Create an array to store the count of each character (initialize with 0)

  • Iterate through the string and increment the count of each character in the array

  • Print the count of each character along with the character itself

Q45. What are the features of Playwright compared to Selenium?

Ans.

Playwright is a modern automation tool for web applications, offering features like multi-browser support and auto-waiting capabilities.

  • Multi-Browser Support: Playwright supports multiple browsers (Chromium, Firefox, WebKit) with a single API, allowing cross-browser testing easily.

  • Auto-Waiting: Playwright automatically waits for elements to be ready before performing actions, reducing flakiness in tests compared to Selenium.

  • Headless Mode: Playwright runs in headless mode by d...read more

Q46. What is the difference between async and await in programming?

Ans.

Async and await are keywords in JavaScript that simplify working with asynchronous code, making it easier to read and maintain.

  • Async Function: Declaring a function with 'async' allows it to return a promise, enabling the use of 'await' within it.

  • Await Keyword: The 'await' keyword pauses the execution of an async function until the promise is resolved, making asynchronous code look synchronous.

  • Error Handling: Async/await simplifies error handling with try/catch blocks, allowin...read more

Q47. Write a program to print the following pattern: * * * * * * * * * * * * * * *

Ans.

Print a pattern of stars in a pyramid shape.

  • Use nested loops to print spaces and stars in the desired pattern.

  • Start with one star at the top and increase the number of stars in each row.

  • Adjust the spacing to create the pyramid shape.

Q48. Explain your logic for finding duplicate numbers and their counts from a given list.

Ans.

Logic to find duplicate numbers and their count in a given list.

  • Iterate through the list and store each number in a hashmap with its count

  • If a number is already in the hashmap, increment its count

  • After iterating, check the hashmap for numbers with count greater than 1 to find duplicates

Q49. From a list seperate elements based on data type and remove the duplicates Dictionary access Selecting elements from e-commerce website Write test cases example API related

Ans.

To separate elements based on data type and remove duplicates from a list

  • Create separate lists for each data type (string, integer, etc.)

  • Iterate through the original list and add elements to respective lists based on data type

  • Remove duplicates from each list using a set or other data structure

  • Combine all lists into a single list without duplicates

Q50. How does Cucumber know where the step definition file is located?

Ans.

Cucumber knows the step definition file based on the annotations provided in the feature files.

  • Cucumber uses annotations like @Given, @When, @Then to map steps in feature files to corresponding step definition methods.

  • Step definition files are typically placed in a separate package or directory within the project structure.

  • Cucumber scans the project directory for step definition files based on the package structure and annotations used in feature files.

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

Interview experiences of popular companies

3.6
 • 10.9k Interviews
3.8
 • 8.5k Interviews
3.6
 • 7.8k Interviews
3.7
 • 5.9k Interviews
3.7
 • 5.8k Interviews
3.7
 • 5k Interviews
3.5
 • 4k Interviews
3.7
 • 3k Interviews
4.0
 • 2.4k 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

Qa Automation Testing 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