Sdet Automation Test Engineer

10+ Sdet Automation Test Engineer Interview Questions and Answers for Freshers

Updated 8 Nov 2024
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

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

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

Sdet Automation Test Engineer Jobs

Sdet Automation Test Engineer 6-10 years
Cognizant
3.8
Hyderabad / Secunderabad
Sdet Automation Test Engineer 1-4 years
Freecharge
4.0
Gurgaon / Gurugram
Sdet Automation Test Engineer 10-15 years
Quinnox
3.8
Mumbai

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

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

Q11. POM Pattern implementation in Java

Ans.

POM (Page Object Model) is a design pattern used in test automation to create reusable and maintainable code by separating page objects from test scripts.

  • Create a separate class for each web page or component

  • Encapsulate the web elements and their actions within the page class

  • Use methods in the page class to interact with the web elements

  • In test scripts, instantiate the page class and call its methods to perform actions on the page

Q12. Find duplicate in array program

Ans.

Program to find duplicates in an array.

  • Iterate through the array and compare each element with the rest of the elements.

  • If a match is found, add it to a separate array or print it.

  • Use a hash table to keep track of the frequency of each element.

  • Sort the array and compare adjacent elements to find duplicates.

Q13. Selenium waits , difference

Ans.

Selenium waits are used to pause the execution of the script, while the difference is in the way they wait for an element.

  • Implicit wait is used to wait for a certain amount of time before throwing an exception if the element is not found.

  • Explicit wait is used to wait for a certain condition to occur before proceeding with the execution.

  • Fluent wait is used to wait for an element with a certain frequency and timeout period.

  • The difference between them is that implicit wait is ap...read more

Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.4k Interviews
3.6
 • 7.6k Interviews
3.7
 • 5.6k Interviews
4.1
 • 5k Interviews
4.0
 • 2.4k Interviews
3.7
 • 897 Interviews
3.8
 • 535 Interviews
3.9
 • 318 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

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