Sdet Automation Test Engineer

100+ Sdet Automation Test Engineer Interview Questions and Answers

Updated 15 Dec 2024

Popular Companies

search-icon

Q1. Wait in selenium and how to find all links present in a page xpath

Ans.

To wait in Selenium, we can use explicit and implicit waits. To find all links in a page using XPath, we can use the findElements() method.

  • To wait in Selenium, we can use explicit wait with ExpectedConditions or implicit wait with the setScriptTimeout() method.

  • Explicit wait waits for a certain condition to occur before proceeding with the next steps.

  • Implicit wait sets a maximum time for the driver to wait for an element to appear.

  • To find all links in a page using XPath, we ca...read more

Q2. What is page object model and test ng annotations

Ans.

Page Object Model (POM) is a design pattern used in test automation to create an object repository for web UI elements.

  • POM helps in creating reusable and maintainable code by separating the test logic from the page-specific details.

  • Each web page is represented as a separate class, and the UI elements and their actions are defined as methods within that class.

  • POM improves code readability, reduces code duplication, and enhances test maintenance.

  • TestNG annotations are used in T...read more

Sdet Automation Test Engineer Interview Questions and Answers for Freshers

illustration image

Q3. How to handle alert in selenium and methods

Ans.

To handle alerts in Selenium, we use the Alert interface and its methods.

  • To switch to an alert, we use the switchTo() method of WebDriver class.

  • To accept or dismiss an alert, we use the accept() or dismiss() method of Alert interface.

  • To get the text of an alert, we use the getText() method of Alert interface.

  • To send text to an alert, we use the sendKeys() method of Alert interface.

Q4. How to take screenshot and project framework

Ans.

To take a screenshot in automation testing, use the built-in methods provided by the testing framework.

  • In Selenium, use the getScreenshotAs() method to capture a screenshot.

  • In Appium, use the getScreenshotAs() method to capture a screenshot.

  • In TestNG, use the ITestResult interface to capture a screenshot on test failure.

  • In Cucumber, use the After hook to capture a screenshot after each scenario.

Are these interview questions helpful?

Q5. What is software testing life cycle

Ans.

Software Testing Life Cycle (STLC) is a process followed to ensure quality in software development by conducting various testing activities.

  • STLC consists of several phases: requirement analysis, test planning, test case development, test environment setup, test execution, and test closure.

  • Each phase has specific objectives and deliverables, ensuring that the testing process is systematic and thorough.

  • STLC helps in identifying defects early, reducing the cost of fixing them, a...read more

Q6. How many locator is present in selenium

Ans.

There are 8 locators present in Selenium.

  • Selenium provides 8 different locators to identify elements on a web page.

  • The locators are: ID, Name, Class Name, Tag Name, Link Text, Partial Link Text, CSS Selector, and XPath.

  • Each locator has its own syntax and usage.

  • For example, to locate an element by ID, you can use driver.findElement(By.id("elementId"));

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. Maximum substring Sum , Merge two arrays without extra space .

Ans.

Find maximum sum of substring and merge two arrays without extra space.

  • Use Kadane's algorithm to find maximum sum of substring in an array.

  • To merge two arrays without extra space, use two pointers approach.

  • Example: Input arrays [1, 2, -3, 4, 5] and [6, 7, 8], output merged array [1, 2, -3, 4, 5, 6, 7, 8].

Q8. How to find broken link

Ans.

To find broken links, use a link checker tool or browser extension.

  • Use a link checker tool like Xenu's Link Sleuth or W3C Link Checker

  • Install a browser extension like Check My Links for Chrome or Link Checker for Firefox

  • Manually check links by clicking on them and checking for error messages

  • Regularly check for broken links to ensure website functionality

Sdet Automation Test Engineer Jobs

Sdet Automation Test Engineer 3-8 years
Oracle
3.7
Hyderabad / Secunderabad
Sdet Automation Test Engineer 3-5 years
Broadridge
4.0
₹ 9 L/yr - ₹ 15 L/yr
Bangalore / Bengaluru
Sdet Automation Test Engineer 4-9 years
Cognizant
3.8
Chennai

Q9. How to run your automated test case in jenkins and its configuration, How to automate DB testing, how do you perform localization testing

Ans.

To run automated test cases in Jenkins, configure DB testing, and perform localization testing

  • To run automated test cases in Jenkins, create a Jenkins job and configure it to trigger the automation test suite

  • For DB testing automation, use tools like Selenium WebDriver to interact with the database and verify data integrity

  • For localization testing, use tools like Selenium WebDriver to test the application with different languages and locales

  • Configure Jenkins to run the automat...read more

Q10. How are dynamic elements handled in Selenium

Ans.

Dynamic elements in Selenium are handled using techniques like explicit waits, fluent waits, and dynamic locators.

  • Use explicit waits to wait for a specific condition to be met before interacting with the element

  • Use fluent waits to wait for an element to be present and visible before interacting with it

  • Use dynamic locators like XPath with functions to locate elements that change dynamically

Q11. Explain framework ur working on, reverse string and swipe no. Without using third variable, method to check checkbox is selected,

Ans.

Answering questions on framework, string reversal, checkbox selection without third variable and swipe no.

  • Working on a hybrid framework with Selenium and Appium for web and mobile automation

  • String reversal can be done using built-in functions or by iterating through the string

  • Checkbox selection can be checked using isSelected() method in Selenium

  • Swipe no. can be achieved using TouchActions class in Appium

  • All of these can be implemented without using a third variable

Q12. 1 coding question Remove letter e from a sentence "Welcome to Ecom Express"

Ans.

Remove letter e from a sentence

  • Iterate through each character in the sentence

  • If the character is not 'e', add it to a new string

  • Return the new string without 'e'

Q13. If you have page with 10 records and verify if a record is deleted

Ans.

To verify if a record is deleted from a page with 10 records, we can check if the record is no longer displayed.

  • Locate the record on the page

  • Verify that the record is no longer visible

  • Confirm that the total number of records displayed is now 9

Q14. Agile methodologies and day to day operations

Ans.

Agile methodologies are integrated into day to day operations for efficient software development.

  • Agile methodologies promote collaboration and flexibility in development

  • Daily stand-up meetings keep the team updated on progress and any roadblocks

  • Sprints allow for focused development and frequent feedback

  • Continuous integration and testing ensure quality and catch issues early

  • Retrospectives provide opportunities for reflection and improvement

Q15. What is the difference between emulator and simulator

Ans.

Emulator replicates both hardware and software of the original device, while simulator only replicates the software.

  • Emulator replicates both hardware and software of the original device

  • Simulator only replicates the software

  • Emulator is slower but more accurate, simulator is faster but less accurate

  • Examples: Android Emulator for testing mobile apps, Flight Simulator for pilot training

Q16. What is the difference between String Buffer and String builder calss

Q17. what is interface in java an d explain OOPS concepts

Ans.

An interface in Java is a reference type, similar to a class, that can contain only constants, method signatures, default methods, static methods, and nested types.

  • Interfaces in Java are used to achieve abstraction and multiple inheritance.

  • Interfaces cannot have method bodies, only method signatures.

  • Classes can implement multiple interfaces, but can only extend one class.

  • Example: interface Shape { void draw(); }

  • Example: class Circle implements Shape { public void draw() { Sys...read more

Q18. What is difference between abstract class and interface

Ans.

Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.

  • Abstract class can have constructor, fields, and methods, while interface cannot have any implementation.

  • A class can implement multiple interfaces but can only inherit from one abstract class.

  • Abstract class is used to provide a common base for multiple derived classes, while interface is used to define a contract for classes to implement.

  • Example: Abstract class 'Shap...read more

Q19. What is method overloading and overridding?

Ans.

Method overloading is when multiple methods have the same name but different parameters, while 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.

  • Method over...read more

Q20. Where you have applied OOPS concept in your automation framework

Ans.

I have applied OOPS concepts in my automation framework by creating reusable classes for different functionalities.

  • Used inheritance to create a base class with common methods for all test cases

  • Implemented polymorphism by overriding methods in child classes for specific test cases

  • Utilized encapsulation to hide the internal details of classes and expose only necessary methods and properties

Q21. Give an example of using Try Catch and Block in your framework

Ans.

Using Try Catch block in a framework for handling exceptions

  • Use Try block to enclose the code that might throw an exception

  • Use Catch block to handle the exception if it occurs

  • Use Finally block to execute code regardless of whether an exception was thrown or not

Q22. write java program to reverse the string/word

Ans.

Java program to reverse a string using StringBuilder

  • Create a StringBuilder object with the input string

  • Use the reverse() method of StringBuilder to reverse the string

  • Convert the StringBuilder object back to a string using toString() method

Q23. What is unit testing and who will be doing it?

Ans.

Unit testing is a software testing method where individual units or components of a software are tested in isolation.

  • Unit testing is typically done by developers to ensure that each unit of code functions correctly on its own.

  • It helps in identifying bugs early in the development process.

  • Unit tests are automated and focus on testing small, specific parts of the code.

  • Examples of unit testing frameworks include JUnit for Java, NUnit for .NET, and pytest for Python.

Q24. Write a test script for a given scenario in any of your suitable framework

Ans.

Write a test script for a given scenario in any suitable framework

  • Identify the scenario to be tested

  • Create test data if needed

  • Write test steps using the chosen framework

  • Execute the test script and analyze results

Q25. Explain Stale element exception and how to overcome that.

Ans.

Stale element exception occurs when an element is no longer attached to the DOM. It can be overcome by re-locating the element.

  • Stale element exception is a common issue in automation testing, especially in Selenium WebDriver.

  • It occurs when an element that was located on a web page becomes stale, meaning it is no longer attached to the DOM.

  • This can happen when the page is refreshed, updated, or changed in some way.

  • To overcome stale element exception, you can re-locate the elem...read more

Q26. write the xpath or CSS code for selected value in the amazon site

Ans.

XPath code for selected value in Amazon site

  • Use the 'contains' function to locate the selected value

  • Identify the unique attributes of the selected value to create a specific XPath

  • Consider using the 'text()' function to locate text within an element

Q27. Are you involved in test plans

Ans.

Yes, I am involved in test plans.

  • I collaborate with the team to create and review test plans.

  • I ensure that the test plans cover all the necessary scenarios.

  • I update the test plans as needed based on changes in requirements or functionality.

  • I use the test plans to guide my testing efforts and report any issues found.

Q28. Write a program to find duplicate elements in an array

Ans.

Program to find duplicate elements in an array of strings

  • Create a HashSet to store unique elements

  • Iterate through the array and check if element is already in the HashSet

  • If element is already in the HashSet, it is a duplicate

Q29. how would ypu explain the traversal of graphs

Ans.

Traversal of graphs involves visiting each vertex and edge in a graph in a systematic way.

  • Traversal can be done using algorithms like Depth First Search (DFS) or Breadth First Search (BFS).

  • DFS explores as far as possible along each branch before backtracking, while BFS explores neighbors before moving on.

  • Traversal can be used to find paths, cycles, connected components, or perform other graph operations.

  • Example: Traversing a social network graph to find friends of friends.

  • Exa...read more

Q30. How to validate API through postman?

Ans.

Validating API through Postman involves sending requests, receiving responses, and verifying data.

  • Create a new request in Postman and enter the API endpoint

  • Add any required headers, parameters, or body data

  • Send the request and check the response status code

  • Verify the response body for expected data or values

  • Use assertions in Postman to validate response data

  • Save the request in a collection for future testing

Q31. What are different type of testing?

Ans.

Different types of testing include functional testing, non-functional testing, manual testing, automated testing, regression testing, and performance testing.

  • Functional testing: Testing the functionality of the software against the requirements.

  • Non-functional testing: Testing aspects like performance, usability, and security.

  • Manual testing: Testing performed manually by testers.

  • Automated testing: Testing performed using automation tools.

  • Regression testing: Testing to ensure t...read more

Q32. What are different types of APIs?

Ans.

APIs can be categorized into different types such as REST, SOAP, GraphQL, and RPC.

  • RESTful APIs: Representational State Transfer APIs use standard HTTP methods like GET, POST, PUT, DELETE for communication.

  • SOAP APIs: Simple Object Access Protocol APIs use XML for message exchange over a network.

  • GraphQL APIs: Query language for APIs that allows clients to request only the data they need.

  • RPC APIs: Remote Procedure Call APIs allow a program to execute code on a remote server.

Q33. What are the exception you got in selenium

Ans.

Some common exceptions in Selenium include NoSuchElementException, TimeoutException, StaleElementReferenceException, and ElementNotVisibleException.

  • NoSuchElementException occurs when an element could not be found in the DOM.

  • TimeoutException occurs when a command does not complete in the specified time.

  • StaleElementReferenceException occurs when an element is no longer attached to the DOM.

  • ElementNotVisibleException occurs when an element is present in the DOM but not visible on...read more

Q34. Write a java program to convert the first letter of each word in upper case

Ans.

Java program to convert first letter of each word to upper case

  • Split the input string into an array of words

  • Iterate through each word and capitalize the first letter

  • Join the words back together into a single string

Q35. Write a java program to remove the duplicate characters from a string

Ans.

Java program to remove duplicate characters from a string

  • Create a HashSet to store unique characters

  • Iterate through the string and add each character to the HashSet

  • Construct a new string by appending characters from the HashSet

Q36. Separate 1's and 0's in an array with minimal complexity

Ans.

Use two pointers approach to separate 1's and 0's in an array of strings with minimal complexity.

  • Initialize two pointers, one at the beginning and one at the end of the array.

  • Move the left pointer until it encounters a '0' and the right pointer until it encounters a '1'.

  • Swap the elements at the left and right pointers, then move the pointers towards each other until they meet in the middle.

Q37. What is regression testing, automation testing

Ans.

Regression testing is retesting software to ensure new changes haven't affected existing functionality. Automation testing is using tools to execute test cases.

  • Regression testing ensures that new code changes haven't affected existing functionality

  • Automation testing involves using tools to execute test cases automatically

  • Regression testing is often performed after code changes or updates

  • Automation testing helps in saving time and effort by automating repetitive test cases

  • Exam...read more

Q38. Java Program for count of characters in the given string

Ans.

Java program to count characters in a given string

  • Use a HashMap to store characters and their counts

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

  • Print the characters and their counts at the end

Q39. Where have you used Interface in your project

Q40. Why python why not others language?

Ans.

Python is a popular choice for automation testing due to its simplicity, readability, extensive libraries, and cross-platform compatibility.

  • Python has a simple and readable syntax, making it easy to write and understand test scripts.

  • Python has a large number of libraries and frameworks specifically designed for automation testing, such as Selenium and PyTest.

  • Python is cross-platform compatible, allowing tests to be run on different operating systems.

  • Python integrates well wit...read more

Q41. Python- Explain how to take input from user

Ans.

Use the input() function in Python to take input from the user.

  • Use the input() function to prompt the user for input and store the input in a variable.

  • You can specify a prompt message inside the input() function to guide the user on what to input.

  • The input() function always returns a string, so you may need to convert the input to the desired data type if needed.

Q42. What is test strategies and test plans

Ans.

Test strategies and test plans are essential documents that outline the approach and scope of testing activities.

  • Test strategy defines the overall testing approach, including objectives, resources, and timelines.

  • Test plan details the specific tests to be conducted, including test cases, test data, and expected results.

  • Test strategy is high-level and focuses on the big picture, while test plan is more detailed and specific.

  • Both documents are crucial for ensuring thorough and e...read more

Q43. what is difference between PUT and POST

Ans.

PUT is used to update or replace an existing resource, while POST is used to create a new resource.

  • PUT is idempotent, meaning multiple identical requests will have the same effect as a single request

  • POST is not idempotent, meaning multiple identical requests may have different effects

  • PUT requires the client to specify the URI of the resource to update, while POST does not

  • PUT is typically used for updating existing resources, while POST is used for creating new resources

Q44. How to automate filters in web page

Ans.

Automating filters in a web page involves identifying filter elements, selecting filter criteria, and verifying filtered results.

  • Identify filter elements on the web page such as dropdowns, checkboxes, or input fields

  • Use automation tools like Selenium to interact with filter elements and select desired criteria

  • Trigger filter action (e.g. clicking 'Apply' button) and wait for the page to refresh with filtered results

  • Verify that the filtered results match the selected criteria b...read more

Q45. What is differences between smoke and sanity

Ans.

Smoke testing is a quick test to check if the build is stable, while sanity testing is a more thorough test to check if the specific functionalities are working as expected.

  • Smoke testing is done to ensure the stability of the build before further testing, while sanity testing is done to ensure the specific functionalities are working correctly.

  • Smoke testing is a subset of regression testing, while sanity testing is a subset of acceptance testing.

  • Smoke testing is usually done ...read more

Q46. explain authorization and authentication

Ans.

Authentication verifies a user's identity, while authorization determines what actions they are allowed to perform.

  • Authentication confirms the user's identity through credentials like passwords or biometrics.

  • Authorization controls the access rights of authenticated users to specific resources or actions.

  • Examples include logging into a website with a username and password (authentication) and being able to view/edit certain pages based on user roles (authorization).

Q47. What is react js and why we used it?

Ans.

React JS is a JavaScript library for building user interfaces.

  • React JS allows for building reusable UI components.

  • It uses a virtual DOM for efficient rendering.

  • React JS is popular for single-page applications and dynamic web interfaces.

  • It follows a component-based architecture.

Q48. How will you automate data in files

Ans.

Automating data in files involves using tools like Selenium WebDriver or Apache POI to read/write data from/to files.

  • Use Selenium WebDriver to interact with web elements and extract data to be written to files

  • Use Apache POI library to read/write data from/to Excel files

  • Utilize scripting languages like Python or Java to automate data manipulation in files

Q49. What is Java streams and Lamda functions

Ans.

Java streams are a sequence of elements that support functional-style operations. Lambda functions are anonymous functions that can be passed as arguments.

  • Java streams provide a way to process collections of objects in a functional style.

  • Lambda functions allow for concise and readable code by enabling the passing of behavior as an argument.

  • Example: Using Java streams to filter a list of numbers and then map them to their squares.

  • Example: Using lambda functions to define a cus...read more

Q50. what is java and cpp and dbms sql etc

Ans.

Java is a popular programming language, C++ is another programming language, and DBMS SQL is a language used for managing databases.

  • Java is an object-oriented programming language commonly used for building web applications and software.

  • C++ is a high-level programming language often used for system programming and game development.

  • DBMS SQL is a language used to interact with relational databases, allowing users to retrieve, update, and manage data.

  • Examples: Java - used in And...read more

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

Interview experiences of popular companies

3.7
 • 10k Interviews
3.7
 • 7.3k Interviews
3.8
 • 5.4k Interviews
3.7
 • 5.2k Interviews
4.1
 • 4.9k Interviews
4.1
 • 2.3k Interviews
3.7
 • 866 Interviews
3.7
 • 507 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

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

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
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