InterviewStack.io LogoInterviewStack.io

Test Automation Script Development Questions

Focuses on the hands on skills required to write, maintain, and troubleshoot automated test scripts across application types. Includes web user interface automation, API testing, mobile and desktop automation, interacting with UI elements, form submission, element selection and localization strategies, synchronization and waiting strategies, reliable assertion design, test data management, modular and readable test code structure, tagging and organizing tests, and common frameworks and libraries such as Selenium WebDriver, RestAssured, and pytest. Also covers best practices for maintainability, parameterization, test fixtures, mocking and stubbing external dependencies, and diagnosing flaky tests.

EasyTechnical
61 practiced
What makes an assertion 'reliable' in UI test automation? Give two examples of fragile assertions and two examples of robust assertions for verifying a successful form submission on a web page. Explain why the robust ones are better for maintainability.
MediumTechnical
66 practiced
Write a pytest-based Selenium test in Python that verifies an AJAX-loaded table contains a row with a specific value (e.g., 'Order #12345'). The test should use an explicit wait until the table has more than zero rows, then search table rows for the target value. Structure the test using a simple page object class for the table component.
EasyTechnical
50 practiced
Define a 'flaky test' in the context of automated testing. List at least five common causes of flakiness (both test and environment related) and describe a short triage checklist you would use to quickly determine the root cause when a flaky test fails intermittently.
HardTechnical
63 practiced
A critical end-to-end test fails nondeterministically during page load because a third-party analytics script sometimes blocks user-event listeners from firing. You cannot change production code. Describe how you would investigate, reproduce, and mitigate this issue so the test suite is reliable without modifying production code. Include short-term and long-term options.
HardTechnical
53 practiced
Implement (or describe in clear Python pseudocode) a custom Selenium locator helper that accepts multiple selector strategies (e.g., id, css, xpath, data-test-id) and attempts them in order until one finds an element. The helper should log which selector succeeded and raise a descriptive error if none succeed. Discuss any performance considerations and caching options.

Unlock Full Question Bank

Get access to hundreds of Test Automation Script Development interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.