Qa Automation Testing Engineer

100+ Qa Automation Testing Engineer Interview Questions and Answers

Updated 28 Nov 2024

Popular Companies

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 json object to 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. 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

Q4. Write a program to find the elements of a list that have least difference in python? input = [3,9,50,15,99,7,98,65] 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

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. What are lists and its 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

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

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

Q8. How to check if for every steps we have steps written in step definition file

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

Qa Automation Testing Engineer Jobs

QA Automation Test Engineer 5-10 years
Cognizant
3.8
Chennai
Qa Automation Testing Engineer 6-11 years
Way Dot Com
4.8
₹ 12 L/yr - ₹ 22 L/yr
Kochi
QA Automation Test Engineer 5-10 years
Cognizant
3.8
Kolkata

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

Q10. What is 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

Q11. If you are not meeting the requirement in your testcase then what the documentation format 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

Q12. Can you tell me how to fetch data from 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

Q13. What modules have you worked on ERPs

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.

Q14. 30. Build an automated script that navigates to Facebook. Login with an invalid credential and verify 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

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

Q16. What are the technologies you used in your testcases.

Ans.

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

  • Selenium

  • JUnit

  • TestNG

  • Cucumber

  • Jenkins

Q17. Ready api groovy script code sample on 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

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

Q19. How to 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

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

Q21. Explain if we remove static keyword from main function what will happen.

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.

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

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

Q24. Where you use Javasrcipt and why we use if we have web element method

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

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

Q26. WAP to print the occurrence of the character present in the 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

Q27. Git commands. What is git stash used for?

Ans.

Git stash is used to temporarily store changes that are not ready to be committed.

  • Git stash is used to save changes that are not ready to be committed, allowing you to switch branches or work on something else.

  • It is useful when you want to temporarily store changes without committing them.

  • You can later apply the stashed changes back to your working directory.

  • Example: git stash save 'work in progress'

  • Example: git stash apply

Q28. Find duplicate numbers and its count from given list explain logic

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

Q29. Find element find elements return types of it if no elements found

Ans.

findElements method in Selenium returns a list of WebElements or an empty list if no elements are found.

  • findElements method returns a list of WebElements

  • If no elements are found, it returns an empty list

  • Return type is List

Q30. Reverse a string code and sort the array in descending order

Ans.

Reverse a string and sort an array of strings in descending order.

  • Create a function to reverse a string using built-in methods or loops.

  • Use a sorting algorithm like bubble sort or quicksort to sort the array in descending order.

  • Ensure the array contains strings for sorting to work properly. Example: ['apple', 'banana', 'cherry']

Q31. Compare array, prime number, second Highest salary, Validate the CSS value, Excel reading

Ans.

Comparing different concepts in QA Automation Testing Engineer

  • Array - Data structure used to store multiple values of the same type

  • Prime number - A number that is only divisible by 1 and itself

  • Second Highest salary - Finding the second highest salary in a list of salaries

  • Validate the CSS value - Ensuring that the CSS value meets the specified criteria

  • Excel reading - Extracting data from an Excel file for testing purposes

Q32. What are the types of hooks present in bdd.

Ans.

Types of hooks in BDD include Before, After, BeforeStep, AfterStep, BeforeFeature, AfterFeature, BeforeScenario, AfterScenario.

  • Before - runs before each scenario

  • After - runs after each scenario

  • BeforeStep - runs before each step in a scenario

  • AfterStep - runs after each step in a scenario

  • BeforeFeature - runs before each feature

  • AfterFeature - runs after each feature

  • BeforeScenario - runs before each scenario

  • AfterScenario - runs after each scenario

Q33. What is method overloading and overriding concept.

Ans.

Method overloading is when multiple methods in the same class have the same name but different parameters. Method overriding is when a subclass provides a specific implementation of a method that is already provided by its superclass.

  • Method overloading involves creating multiple methods in the same class with the same name but different parameters.

  • Method overriding occurs when a subclass provides a specific implementation of a method that is already provided by its superclass...read more

Q34. What types of locators you used in ur project.

Ans.

I have used various types of locators in my project, including ID, name, class name, xpath, and CSS selectors.

  • ID locator: Used to locate elements by their unique ID attribute.

  • Name locator: Used to locate elements by their name attribute.

  • Class name locator: Used to locate elements by their class name attribute.

  • XPath locator: Used to locate elements using XPath expressions.

  • CSS selector locator: Used to locate elements using CSS selectors.

Q35. What is the different types of draw back of selenium

Ans.

Some drawbacks of Selenium include limited support for handling non-browser windows, lack of built-in reporting capabilities, and difficulty in testing mobile applications.

  • Limited support for handling non-browser windows (pop-ups, alerts, etc.)

  • Lack of built-in reporting capabilities, requiring integration with third-party tools like TestNG or JUnit

  • Difficulty in testing mobile applications due to the need for additional tools like Appium

  • Selenium scripts can be brittle and pron...read more

Q36. how do you handle upload pop up in selenium?

Ans.

Handle upload pop up in Selenium by using sendKeys method to upload file

  • Use sendKeys method to send file path to the upload input field

  • Make sure to handle any pop-ups that may appear during the upload process

  • Verify the successful upload by checking for any success messages or elements on the page

Q37. Write a program in java to get the count of duplicate char in string

Ans.

Program in Java to count duplicate characters in a string

  • Create a HashMap to store characters and their counts

  • Iterate through the string and update the counts in the HashMap

  • Finally, iterate through the HashMap and count characters with count > 1

Q38. WAP to swap the two integer without using third variable.

Ans.

Swapping two integers without using a third variable in a programming language.

  • Use bitwise XOR operation to swap two integers without using a third variable.

  • Example: int a = 5, b = 10; a = a ^ b; b = a ^ b; a = a ^ b; // Now a = 10, b = 5

Q39. Write one step definition by seeing the feature file.

Ans.

The step definition should match the steps in the feature file for automation testing.

  • Read the step from the feature file

  • Create a corresponding step definition in the automation testing framework

  • Ensure the step definition accurately performs the desired action

Q40. What is constructor in Java?

Ans.

Constructor in Java is a special type of method that is used to initialize objects.

  • Constructors have the same name as the class they are in.

  • They do not have a return type, not even void.

  • They are called when an object of a class is created.

  • Constructors can be overloaded, meaning a class can have multiple constructors with different parameters.

  • Example: public class Car { public Car() { // default constructor } public Car(String model) { // parameterized constructor }}

Q41. 6-API testing various response codes

Ans.

API testing involves checking various response codes to ensure the API functions correctly.

  • Test for common response codes like 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not Found), 500 (Internal Server Error)

  • Verify the response code matches the expected result based on the API request

  • Use tools like Postman or RestAssured to automate API testing and check response codes

  • Check for edge cases where the API may return unexpected response codes

Q42. How to create job for CI/CD in jenkins.

Ans.

To create a job for CI/CD in Jenkins, you can use the Jenkins interface to configure a new job with the necessary build and deployment steps.

  • Navigate to Jenkins dashboard and click on 'New Item' to create a new job

  • Select the type of job you want to create (Freestyle project, Pipeline, etc.)

  • Configure the job settings such as source code repository, build triggers, build steps, and post-build actions

  • Set up the job to be triggered automatically by changes in the source code repo...read more

Q43. What is the different types of frameworks selenium

Ans.

Selenium frameworks include Data-Driven, Keyword-Driven, Hybrid, Page Object Model, and Behavior-Driven Development.

  • Data-Driven Framework: Tests are driven by external data sources like Excel sheets or databases.

  • Keyword-Driven Framework: Tests are written using keywords and actions.

  • Hybrid Framework: Combination of Data-Driven and Keyword-Driven frameworks.

  • Page Object Model: Each web page is represented as a class, making tests more maintainable.

  • Behavior-Driven Development (BD...read more

Q44. Is Cucumber Data Driven Framework?

Ans.

Yes, Cucumber is a Data Driven Framework.

  • Cucumber allows for writing test cases in plain English using Gherkin syntax

  • Data can be stored in external files like Excel, CSV, or JSON and easily integrated into test scripts

  • Scenarios can be parameterized to run with different test data sets

Q45. Select an element from drop down

Ans.

To select an element from a drop down, locate the drop down element and use the select class in Selenium.

  • Locate the drop down element using findElement() method

  • Create an object of Select class using the drop down element

  • Use selectByVisibleText(), selectByValue() or selectByIndex() method to select the desired option

Q46. What are the Response codes of API

Ans.

Response codes of API are standardized status codes returned by a server in response to a client's request.

  • 200 - OK: Request was successful

  • 400 - Bad Request: Invalid input or missing parameters

  • 401 - Unauthorized: Authentication required

  • 404 - Not Found: Resource not found

  • 500 - Internal Server Error: Server-side issue

Q47. What is API Testing and its purpose

Ans.

API Testing is testing the application programming interface to ensure it meets functionality, reliability, performance, and security requirements.

  • API Testing involves testing the communication between different software systems through APIs.

  • It ensures that the API functions correctly, returns the expected results, and handles errors gracefully.

  • API Testing can be done at different levels such as unit testing, integration testing, and end-to-end testing.

  • Tools like Postman, Soa...read more

Q48. Program to print average of number series

Ans.

Program to print average of number series

  • Create a variable to store the sum of the numbers in the series

  • Create a variable to store the count of numbers in the series

  • Loop through the series and add each number to the sum variable

  • Increment the count variable for each number in the series

  • Calculate the average by dividing the sum by the count

  • Print the average

Q49. Write a program to print Fibonacci series

Ans.

Program to print Fibonacci series

  • Declare two variables to store the first two numbers of the series

  • Use a loop to generate the next numbers in the series

  • Print each number as it is generated

Q50. Input string str= " Name SIRNAME" EXPECTED OUTPUT "Name Sirname"

Ans.

The expected output is to capitalize the first letter of each word in the input string.

  • Split the input string by space to get individual words

  • Capitalize the first letter of each word

  • Join the words back together with a space in between

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

Interview experiences of popular companies

3.7
 • 10k Interviews
3.9
 • 7.8k Interviews
3.7
 • 7.3k Interviews
3.8
 • 5.4k Interviews
3.8
 • 4.6k Interviews
3.6
 • 3.6k Interviews
3.8
 • 2.8k Interviews
3.6
 • 2.3k Interviews
4.1
 • 2.3k 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
Get AmbitionBox app

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