Automation Test Engineer
500+ Automation Test Engineer Interview Questions and Answers
Q1. How to handle scrollbar and mouse activities Jenkins and Github Story Point in Agile Backlogs in Agile Jira workflow explain framework pom.xml wap number reverse program StellException Exception in Selenium dif...
read moreThe question is about handling scrollbar and mouse activities in automation testing.
To handle scrollbar, you can use methods like scrollIntoView(), scrollTo(), or Actions class in Selenium.
To handle mouse activities, you can use Actions class in Selenium to perform actions like click, double click, drag and drop, etc.
Jenkins is a popular continuous integration and delivery tool, while GitHub is a web-based version control system.
Story Point is a unit of measure used in Agile ...read more
Q2. Introduce yourself 1.What is STLC 2. difference between Test plan,test case,test scanario 3.Positive and negative scanarion on pen. 4.selenium framework. 5.how to write selenium test cases.
I am an Automation Test Engineer with knowledge of STLC, test plan, test case, test scenario, Selenium framework, and writing Selenium test cases.
STLC stands for Software Testing Life Cycle and is a process followed to ensure quality in software testing.
Test plan is a document that outlines the testing strategy, objectives, and scope of testing.
Test case is a set of steps and conditions that are executed to verify the functionality of a software application.
Test scenario is a...read more
Automation Test Engineer Interview Questions and Answers for Freshers
Q3. What is Automation? what is selenium?what is xpath? what is regression testing? what is id()?what is name()?what is linktext()?what is partial link text()? what is tag()? what is attribute()?what is CSS()? what...
read moreAutomation, Selenium, XPath, Regression Testing, and Web Elements
Automation is the process of using software tools to execute test cases
Selenium is an open-source automation testing tool used for web applications
XPath is a language used to navigate through XML documents and locate web elements
Regression testing is the process of testing changes to ensure they do not affect existing functionality
id(), name(), linktext(), partial link text(), tag(), and attribute() are methods ...read more
Q4. 1) cucumber 2) Defects worked on, tell me about the bugs you found during testing 3) Functional Testing 4) Automation testing tools you worked on how you worked on in detail
Questions related to cucumber, defects found, functional and automation testing tools.
Cucumber is a BDD tool used for testing
Found defects related to UI, functionality, and performance
Functional testing involves testing the application's features and functionality
Worked on automation tools like Selenium, Appium, and TestNG
Used automation tools to create test scripts and execute them
Integrated automation scripts with CI/CD pipeline for continuous testing
Q5. 1] Introduction 2] Sanity Vs Smoke testing 3] Waits in selenium and code for it 4] Scenario based questions 5] types of frameworks 6] how to read data from excel 7] Coding questions based on- handling dropdown ...
read moreInterview questions for Automation Test Engineer
Sanity testing is a subset of regression testing while smoke testing is a subset of acceptance testing
Waits in Selenium are used to synchronize the test execution with the application's response
Types of frameworks include data-driven, keyword-driven, and hybrid frameworks
Reading data from Excel can be done using Apache POI library
Handling dropdown in Selenium can be done using Select class
Database automation can be done using JD...read more
Q6. How to remove repeated words from output in string without using predefined methods.
Removing repeated words from a string without using predefined methods.
Split the string into an array of words
Create an empty array to store unique words
Loop through the array of words and check if the word is already in the unique words array
If the word is not in the unique words array, add it
Join the unique words array back into a string
Share interview questions and help millions of jobseekers 🌟
Q7. 1. diff b/w findelements vs findelement? 2. set vs map? 3. wap for occurences of characters 4. wap for fibonacci series 5. write xpath from a website(they will tell the exact location) 6. How to get galues from...
read moreAnswers to various technical questions related to automation testing and software development.
findElements vs findElement: findElements returns a list of web elements matching the locator, while findElement returns the first web element matching the locator.
Set vs Map: Set is a collection of unique elements, while Map is a collection of key-value pairs.
Program for occurrences of characters: Write a program to count the occurrences of each character in a given string.
Program f...read more
Q8. 1.types of wait, 2. Locators in selenium 3.grid vs webdriver 4.css selector vs xpath 5.types of list 6. What is use of action class 7.java script executor 8.interfaces 9.oops concepts 10.windows/alert nagivatio...
read moreInterview questions for Automation Test Engineer
Types of wait - implicit, explicit, fluent
Locators in Selenium - ID, Name, Class Name, Tag Name, Link Text, Partial Link Text, CSS Selector, XPath
Grid vs WebDriver - Grid allows parallel execution on multiple machines, WebDriver executes tests on a single machine
CSS Selector vs XPath - CSS Selector is faster, XPath is more powerful
Types of list - ArrayList, LinkedList, Vector
Use of Action Class - performing advanced user interac...read more
Automation Test Engineer Jobs
Q9. 5. Git repository . How to push and pull code.
Git is a version control system. Push code to upload changes to a remote repository. Pull code to download changes from a remote repository.
To push code, use the command 'git push
'. For example, 'git push origin master'. To pull code, use the command 'git pull
'. For example, 'git pull origin master'. Make sure to commit changes before pushing code using the command 'git commit -m
'. Use 'git status' to check the status of your local repository.
Use 'git clone
' to clone a rem...read more
Q10. What is assertion? What is soft assertion? What is hard assertion?
Assertion is a validation point to check if the expected result matches the actual result. Soft assertion doesn't stop the test execution on failure, while hard assertion does.
Assertion is a way to validate if the expected result matches the actual result
Soft assertion doesn't stop the test execution on failure, but logs the failure and continues with the test
Hard assertion stops the test execution on failure and marks the test as failed
Example of soft assertion: verifying mu...read more
Q11. 1)How to run failed test case: using failed.xml 2)how to use click in diff ways: by actions class click and by javascriptexecuter 3)array logical program *array reverse *array sec highest number 1 12 123 1234 1...
read moreInterview questions for Automation Test Engineer
To run failed test case, use failed.xml
Click can be used via Actions class or JavascriptExecutor
Array programs: reverse, second highest number
Constructor in abstract class
Test plan and scenario definition
Roles and responsibilities in current organization
Disable test cases using keyword or include/exclude in suite
Polymorphism concept
Unix commands used in day to day activity
TestNG annotations and keywords
Code for scroll up and dow...read more
Q12. How to navigate to other tab in selenium? How to do work on different frame?
To navigate to other tab in Selenium, switch to the desired window handle. To work on different frame, switch to the frame using its name or index.
To navigate to other tab, use driver.switchTo().window() method
To work on different frame, use driver.switchTo().frame() method
To switch back to default content, use driver.switchTo().defaultContent() method
To switch to frame using name or id, use driver.switchTo().frame("frameName") or driver.switchTo().frame("frameId")
To switch t...read more
Q13. How to write good test cases? What is required when you creating test plan?
Good test cases require clear objectives, thorough planning, and attention to detail.
Identify the objective of the test case
Ensure the test case is specific, measurable, achievable, relevant, and time-bound (SMART)
Consider all possible scenarios and edge cases
Document the expected results
Include preconditions and post-conditions
Ensure the test case is repeatable and reproducible
Review and validate the test case with stakeholders
Q14. What is TestNG? Write the methods name? Importance.
TestNG is a testing framework for Java that supports various testing types and provides advanced features like parallel testing and reporting.
TestNG stands for Test Next Generation.
It supports various testing types like unit, functional, integration, and end-to-end testing.
TestNG provides annotations like @Test, @BeforeSuite, @AfterSuite, etc. to define test methods and their execution order.
It supports parallel testing, which helps in reducing the overall test execution time...read more
Q15. 1.Difference Between Const,Var,Char. 2.Oop's concept with example 3.JavaScript is async or sync language and explain the reason. 4.How to create a simple object in JavaScript. 5.Find element and Find Elements d...
read moreAnswers to common interview questions for Automation Test Engineer position.
Const is used for constant values that cannot be reassigned, var is used for variable declaration, and char is a data type for storing characters in programming languages.
OOPs concepts include inheritance, encapsulation, polymorphism, and abstraction. Example: Inheritance allows a class to inherit properties and methods from another class.
JavaScript is an asynchronous language, meaning it can execute ...read more
Q16. If priority of test is -1, 0, 1. which executes first.
Test with priority 1 executes first, followed by 0 and then -1.
Tests with higher priority are executed first
Priority can be used to determine the order of execution
Priority can be set in test management tools like JIRA or TestRail
Q17. What is Select class in Selenium. Write down syntax and explain the methods
Select class in Selenium is used to handle dropdowns and multi-select options on a web page.
Syntax: Select select = new Select(driver.findElement(By.id("dropdownId")));
Methods: selectByVisibleText(), selectByValue(), selectByIndex(), getOptions(), isMultiple(), getAllSelectedOptions(), deselectAll(), deselectByVisibleText(), deselectByValue(), deselectByIndex()
Select class is used to handle dropdowns and multi-select options on a web page.
It provides various methods to select...read more
Q18. Explain control statements? It is used to control the flow of execution of the program. We have two types they are Branching statements and Looping statements. Branching statements: these are used to branch fro...
read moreControl statements are used to control the flow of execution of a program. They include branching and looping statements.
Branching statements are used to execute a particular set of statements and include simple if, if else, nested if else, else if ladder, and switch.
Looping statements are used to execute a set of instructions repeatedly and include for loop, while loop, and do while.
Control statements are essential for creating efficient and effective programs.
Examples of co...read more
Q19. What is parallel testing? Write the code.
Parallel testing is running multiple tests simultaneously to save time and increase efficiency.
Parallel testing is useful for large test suites that take a long time to run.
It requires a test framework that supports parallel execution.
Code example: pytest -n 4 (runs 4 tests in parallel)
Parallel testing can be done on multiple machines or on a single machine with multiple cores.
It can help identify and isolate issues faster.
Parallel testing can also help with load testing and ...read more
Q20. Which java concepts have you used in your selenium script
I have used concepts like OOPs, Exception Handling, Collections, and Multithreading in my Selenium script.
Used OOPs concepts like inheritance and polymorphism to create reusable code
Implemented Exception Handling to handle unexpected errors and exceptions
Used Collections like ArrayList and HashMap to store and retrieve data
Implemented Multithreading to run tests in parallel for faster execution
Used WebDriver interface to interact with web elements and perform actions
Q21. How to take multiple values from dropdown , write the code
To take multiple values from dropdown, use a loop to iterate through each option and select them.
Identify the dropdown element using its locator
Use the Select class to create an object for the dropdown
Use the getOptions() method to get all the options in the dropdown
Iterate through the options using a loop and select each option using the selectByVisibleText() or selectByValue() method
Q22. How many joins are there in Sql. Write the query for each joins.
There are four types of joins in SQL: Inner Join, Left Join, Right Join, and Full Outer Join.
Inner Join: returns only the matching rows from both tables
Left Join: returns all the rows from the left table and matching rows from the right table
Right Join: returns all the rows from the right table and matching rows from the left table
Full Outer Join: returns all the rows from both tables, with NULL values in the columns where there is no match
Q23. 3. What are different types of waits in selenium.
Different types of waits in Selenium include implicit, explicit, and fluent waits.
Implicit wait: waits for a certain amount of time before throwing an exception if the element is not found
Explicit wait: waits for a certain condition to be met before proceeding with the next step
Fluent wait: waits for a certain condition to be met within a specified time frame, polling at regular intervals
Examples: WebDriverWait, ExpectedConditions
Q24. Why I am getting elementNotPresent exception even element present on 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
Q25. What is polymorphism and explain with examples you used in your project
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as if they were the same type.
Polymorphism is achieved through method overriding and method overloading
Example: A parent class Animal has a method called makeSound(). Child classes like Dog, Cat, and Cow can override this method to make their own unique sound.
Another example is method overloading where a class can have multiple methods with the same name but di...read more
Q26. Insert the value in text box by using 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
Q27. what is selenium grid?, what frame work u use, explain?, what is web driver ?methods ,What is your daily activity ? Asked to write a mail to a client addressing about task completed .
Selenium grid is a tool used for parallel execution of test cases on multiple machines. WebDriver is a tool for automating web applications.
Selenium grid allows for distributed testing across multiple machines and browsers
WebDriver is a tool for automating web applications and supports multiple programming languages
Daily activities include writing and executing test cases, debugging issues, and reporting results
Framework used depends on project requirements and can vary from ...read more
Q28. 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
Q29. Explain how cucumber is used with Selenium Java
Cucumber is used to write and execute automated acceptance tests in Selenium Java.
Cucumber allows for writing test scenarios in plain English using Gherkin syntax
These scenarios are mapped to step definitions in Java code
Selenium Java is used to interact with the web application being tested
Cucumber and Selenium Java are integrated using a test runner such as JUnit or TestNG
Q30. 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.
Q31. Can you create a Static method inside an Abstract class or Interface?
Yes, you can create a static method inside an abstract class or interface.
Static methods can be defined in interfaces since Java 8.
Static methods in interfaces are used for providing utility methods that are not tied to any specific instance of the interface.
Static methods in abstract classes can be used for common functionality that does not require an instance of the class.
Q32. How to scroll in mobile 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()
Q33. How to point to any other branch other than master in Jenkins
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
Q34. How will you track the task 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
Q35. 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
Q36. Write SQL query to get the 10th highest salary from 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
Q37. Mention 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
Q38. How to take 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
Q39. What is abstraction and difference between interface and 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
Q40. 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++; }
Q41. What is the design pattern used in my framework
I don't have the available data to answer this question.
N/A
Q42. 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.
Q43. 2. TestNg and it's annotations and order of execution.
TestNG is a testing framework for Java. Annotations like @Test, @BeforeMethod, @AfterMethod, etc. are used to define test cases and their order of execution.
@Test annotation is used to define a test case.
@BeforeMethod and @AfterMethod annotations are used to define pre and post conditions for each test case.
Test cases can be grouped using @Test annotation with 'groups' parameter.
Test cases can be prioritized using @Test annotation with 'priority' parameter.
Test cases can be e...read more
Q44. 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
Q45. 2.How to execute test cases in parallel.
Test cases can be executed in parallel by using tools like Selenium Grid or TestNG.
Use a tool like Selenium Grid to distribute test cases across multiple machines
Use TestNG to run tests in parallel by specifying the number of threads
Ensure that the test cases are independent and do not have any dependencies
Use a continuous integration tool like Jenkins to manage and execute parallel tests
Monitor the test execution and analyze the results to identify any issues
Parallel executi...read more
Q46. Login with multiple credentials which are stored in one 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
Q47. Java program in Array , highest profit on being and selling books. {1,7,4,9,5} . Buy books on monday, Tuesday...Friday for 1 rs, 7 rs, ...5rs respectfully. Sold then on any day eg Thursday you sold by buing on ...
read moreJava 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
Q48. Take the backup of the table and insert the value in the same table of 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
Q49. 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.
Q50. 3. Selenium and it's method and different commands used.
Selenium is a popular automation testing tool used for web applications. It has various methods and commands for testing.
Selenium WebDriver is used for automating web applications
findElement() method is used to locate an element on the web page
sendKeys() method is used to enter text into a text field
click() method is used to click on an element
getTitle() method is used to get the title of the web page
getText() method is used to get the text of an element
getAttribute() method ...read more
Interview Questions of Similar Designations
Top Interview Questions for Automation Test Engineer Related Skills
Interview experiences of popular companies
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
Reviews
Interviews
Salaries
Users/Month