LTIMindtree, TCS & Deloitte QA Interview Questions Checklist
These are real automation testing interview questions from LTIMindtree (L1 and L2 rounds) and TCS / Deloitte technical rounds, with a short answer for each and code where you'd be asked to write it. Use them as a QA interview question checklist: answer each one aloud first, then compare with the answer and the linked tutorial.
LTIMindtree — L1 Round
What is Selenium, and what are its components?
Selenium is an open-source browser automation suite used to automate web applications across different browsers and operating systems.
Its major components are:
- Selenium WebDriver — the primary automation API used to interact with browsers.
- Selenium Grid — used for parallel execution and cross-browser testing.
- Selenium IDE — a record-and-playback tool useful for creating simple automation flows.
See Selenium WebDriver Fundamentals.
What types of waits are there? Write the explicit wait syntax.
The three commonly discussed Selenium waits are:
- Implicit wait — applies globally when locating elements.
- Explicit wait — waits for a specific condition.
- Fluent wait — an explicit wait with configurable polling intervals and ignored exceptions.
Example of an explicit wait:
new WebDriverWait(driver, Duration.ofSeconds(10))
.until(ExpectedConditions.visibilityOfElementLocated(By.id("result")));
Explain Java Collections with an example.
Java Collections provide interfaces and classes for storing and manipulating groups of objects.
The commonly used collections in automation are:
| Collection | Characteristics | Automation Example |
|---|---|---|
List |
Ordered, duplicates allowed | List<WebElement> for search results |
Set |
Unique elements | Set<String> for browser window handles |
Map |
Key-value pairs | Test data and configuration |
Common implementations include ArrayList, HashSet, LinkedHashSet, HashMap, and LinkedHashMap.
See Collections in Your Framework.
What is the static keyword used for?
The static keyword makes a member belong to the class rather than to individual objects.
A static member can be accessed without creating an object of the class.
For example:
public class TestUtils {
public static final String ENVIRONMENT = "QA";
public static void printEnvironment() {
System.out.println(ENVIRONMENT);
}
}
In automation frameworks, static can be used for utility methods, constants, configuration values, or a static ThreadLocal<WebDriver> in a driver-management design.
Write a sample POST API request.
Using RestAssured:
given()
.baseUri("https://jsonplaceholder.typicode.com")
.contentType(ContentType.JSON)
.body("{\"title\": \"Demo\", \"body\": \"Hello\", \"userId\": 1}")
.when()
.post("/posts")
.then()
.statusCode(201);
A good interview answer should also explain that a POST request is generally used to create a new resource.
PUT vs PATCH?
Both are HTTP methods used to update resources, but they differ in how the update is performed.
| PUT | PATCH |
|---|---|
| Usually replaces the complete resource | Updates only the fields provided |
| Commonly treated as idempotent | May or may not be idempotent depending on implementation |
| Client generally sends the complete representation | Client sends only the required changes |
See GET vs POST vs PUT vs PATCH.
Reverse a string from console input.
Scanner sc = new Scanner(System.in);
String input = sc.nextLine();
System.out.println(new StringBuilder(input).reverse());
Example:
Input: Selenium
Output: muineleS
Relative vs absolute XPath?
An absolute XPath starts from the root of the HTML document and follows the complete hierarchy.
Example:
/html/body/div[1]/div[2]/input
A relative XPath starts from a meaningful element or attribute.
Example:
//input[@name='q']
Relative XPath is generally more maintainable because it does not depend heavily on the complete DOM hierarchy.
See Absolute vs Relative XPath.
How do you execute tests in parallel?
With TestNG, parallel execution can be configured using parallel and thread-count in testng.xml.
Example:
<suite name="ParallelSuite" parallel="tests" thread-count="3">
<test name="ChromeTests">
<classes>
<class name="tests.LoginTest"/>
</classes>
</test>
<test name="FirefoxTests">
<classes>
<class name="tests.SearchTest"/>
</classes>
</test>
</suite>
For a thread-safe framework, a ThreadLocal<WebDriver> can be used so that each execution thread gets its own browser instance.
Selenium Grid can additionally be used for distributed and cross-browser execution.
See Parallel Execution & Grid.
LTIMindtree — L2 Round
Explain your automation framework from scratch, and the Page Object Model.
When explaining your framework, cover the architecture from the bottom up instead of simply listing tools.
A strong explanation should include:
- Test classes and test scenarios.
- Page Object Model.
- Driver management.
- Configuration management.
- Test data handling.
- Utility and reusable methods.
- TestNG configuration.
- Reporting and logging.
- Screenshot handling.
- Maven dependency management.
- Git and CI/CD integration.
- Parallel execution.
The Page Object Model (POM) separates page locators and page-specific actions from test cases.
For example:
public class LoginPage {
private WebDriver driver;
private By username = By.id("username");
private By password = By.id("password");
private By loginButton = By.id("login");
public LoginPage(WebDriver driver) {
this.driver = driver;
}
public void login(String user, String pass) {
driver.findElement(username).sendKeys(user);
driver.findElement(password).sendKeys(pass);
driver.findElement(loginButton).click();
}
}
See Explain Your Automation Framework and Build a Framework From Scratch.
Write the XPath for a search box, such as on Google.
Inspect the element and identify a stable attribute.
For example:
//*[@name='q']
The important part of the interview answer is not just writing the XPath. Explain why you selected the attribute.
For example:
“I would prefer the
nameattribute because it is meaningful and stable compared with a generated CSS class. If a reliable unique ID were available, I would consider using that first.”
The exact XPath may change when the application's DOM changes, so interviewers often want to understand your locator-selection reasoning.
Authentication vs authorization?
Authentication verifies who the user or client is.
Examples:
- Username and password.
- API token.
- OAuth access token.
- JWT.
Authorization determines what an authenticated user is allowed to access or perform.
For example:
- An admin can delete users.
- A normal user can view their own profile.
- A guest cannot access an administrative API.
In API testing:
- 401 Unauthorized generally indicates an authentication problem.
- 403 Forbidden generally indicates that authentication succeeded but access is not permitted.
Which status code means Service Unavailable?
503 — Service Unavailable.
It generally indicates that the server is temporarily unable to handle the request, for example because of maintenance, overload, or temporary unavailability.
Check whether an input is alphanumeric.
public static boolean isAlphanumeric(String s) {
return s != null
&& !s.isEmpty()
&& s.matches("[A-Za-z0-9]+");
}
Examples:
"Test123" → true
"Test@123" → false
"12345" → true
"Test 123" → false
Checked vs unchecked exceptions?
Checked exceptions are checked by the compiler. They must either be handled with try-catch or declared using throws.
Example:
IOException
SQLException
Unchecked exceptions are subclasses of RuntimeException and are not enforced by the compiler.
Examples:
NullPointerException
ArrayIndexOutOfBoundsException
IllegalArgumentException
Selenium can also throw runtime exceptions such as:
NoSuchElementException
TimeoutException
StaleElementReferenceException
Explain OOP concepts, and how you use them in your framework.
The four major OOP concepts are:
1. Encapsulation
Keep implementation details private and expose required functionality through methods.
Example:
private By username = By.id("username");
public void enterUsername(String value) {
driver.findElement(username).sendKeys(value);
}
This is commonly used in Page Object classes.
2. Inheritance
A child class can reuse functionality from a parent class.
For example:
public class LoginTest extends BaseTest {
}
A BaseTest may contain common driver initialization and cleanup logic.
3. Polymorphism
The same reference can represent different implementations.
WebDriver driver = new ChromeDriver();
Here, the WebDriver reference points to a ChromeDriver object.
Method overloading is another common example of compile-time polymorphism.
4. Abstraction
Expose what an object does while hiding implementation details.
For example:
WebDriver driver;
The test interacts with the WebDriver interface instead of depending directly on the internal implementation of the browser driver.
See OOP Concepts in Your Framework.
TCS / Deloitte — Technical Round
Reverse a string while keeping spaces in place.
The idea is to reverse only the non-space characters while keeping every space at its original index.
public static String reversePreservingSpaces(String s) {
char[] out = new char[s.length()];
// Keep spaces in their original positions
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == ' ') {
out[i] = ' ';
}
}
int j = s.length() - 1;
// Place non-space characters from the opposite direction
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == ' ') {
continue;
}
while (out[j] == ' ') {
j--;
}
out[j--] = s.charAt(i);
}
return new String(out);
}
Example:
Input: I love Java
Output: a vaJe volI
Find the second-highest salary using SQL.
One simple approach is:
SELECT MAX(salary)
FROM employees
WHERE salary < (
SELECT MAX(salary)
FROM employees
);
For more complex cases, especially when duplicate salaries need to be handled, DENSE_RANK() is useful.
See Top 25 SQL Questions for Testers.
Explain SQL joins and their types.
SQL joins combine rows from two or more tables based on a related column.
| Join | Meaning |
|---|---|
INNER JOIN |
Returns matching rows from both tables |
LEFT JOIN |
Returns all rows from the left table and matching rows from the right |
RIGHT JOIN |
Returns all rows from the right table and matching rows from the left |
FULL OUTER JOIN |
Returns matching and non-matching rows from both tables |
Example:
SELECT e.name, d.department_name
FROM employees e
INNER JOIN departments d
ON e.department_id = d.department_id;
See SQL Joins Compared.
What is LinkedHashMap?
LinkedHashMap is a Map implementation that maintains insertion order while storing key-value pairs.
For example:
Map<Character, Integer> map = new LinkedHashMap<>();
for (char c : "selenium".toCharArray()) {
map.put(c, map.getOrDefault(c, 0) + 1);
}
It can be useful when counting characters while also preserving the order in which keys were first inserted.
Black box vs white box testing?
Black box testing validates the application's behavior from the outside without requiring knowledge of the internal implementation.
Examples:
- Functional testing.
- System testing.
- End-to-end testing.
White box testing examines internal code, logic, branches, conditions, and execution paths.
Examples:
- Code-level testing.
- Statement coverage.
- Branch coverage.
- Path coverage.
See Black, White & Gray Box Testing.
Automate a calendar web element.
A common approach is:
- Open the calendar.
- Read the currently displayed month and year.
- Compare it with the target month and year.
- Click the Next button.
- Repeat until the required month appears.
- Click the required day.
- Add a loop limit to prevent an infinite loop.
For a complete Selenium implementation, see Cognizant & Infosys Interview Questions.
How do you fetch the text typed into a text box?
Do not normally use getText() for an <input> element.
Instead, read its value attribute:
String value = element.getAttribute("value");
With Selenium 4, you can also use:
String value = element.getDomProperty("value");
For example:
WebElement input = driver.findElement(By.id("username"));
input.sendKeys("Naveed");
System.out.println(input.getAttribute("value"));
getText() generally returns the visible text of an element, whereas an input's entered value is stored in its value property.
How do you enter text into an alert?
For a JavaScript prompt alert:
Alert prompt = driver.switchTo().alert();
prompt.sendKeys("QA Engineer");
prompt.accept();
Remember the distinction:
accept()→ clicks OK.dismiss()→ clicks Cancel.getText()→ reads alert text.sendKeys()→ enters text into a prompt.
Smoke vs sanity testing?
Smoke testing is broad and shallow testing performed to determine whether the major functionality of a new build is stable enough for further testing.
Sanity testing is narrower and generally focuses on specific functionality after a change or defect fix.
| Smoke Testing | Sanity Testing |
|---|---|
| Broad coverage | Narrow coverage |
| Checks critical functionality | Checks specific changed functionality |
| Often performed on a new build | Often performed after a fix/change |
| Determines whether deeper testing can proceed | Determines whether the specific change behaves correctly |
What are Selenium 4 relative locators?
Selenium 4 provides relative locators that allow an element to be located based on its position relative to another element.
The commonly used relative locator methods are:
above()below()toLeftOf()toRightOf()near()
Example:
driver.findElement(
with(By.tagName("input"))
.below(By.id("username"))
);
Relative locators can be useful when the relationship between elements is more stable or meaningful than a direct locator.
See Locators & XPath.
What challenges did you face in your project?
Choose two genuine challenges from your project and structure the answer using STAR:
- Situation — What was happening?
- Task — What responsibility did you have?
- Action — What exactly did you do?
- Result — What improved as a result?
For example, a framework-related answer could discuss a flaky test suite, parallel execution issue, unstable locators, API dependency, test-data problem, or CI execution failure.
The important part is to explain your contribution, the technical decision you made, and the measurable result.
Topic Checklists for Self-Assessment
For broader revision, work through each topic's question bank and mark anything you can't answer confidently.
| Topic | Checklist |
|---|---|
| Core Java & OOP | Java Questions for Testers |
| Java coding | Top 30 SDET Coding Questions |
| Selenium WebDriver | Top 50 Selenium Questions |
| Manual testing | Top 30 Manual Testing Questions |
| TestNG | TestNG Interview Questions — including RetryAnalyzer, listeners, groups and parallel runs |
| Cucumber BDD | Top 15 BDD Questions |
| POM & framework | The Complete Automation Framework Guide |
Other Company Guides
From Real Projects
With over four years in testing, at Voltstream Technologies and WizzyBox, the interviews I've prepared for focused as much on projects and process as on theory. For each question here, practice a short answer that includes one real example: an application you tested, a test type you performed, or part of the framework you worked on. On Apkope, prospect and customer data arrives from email, phone, social media and chatbots, so test scenarios had to cover every channel that feeds the same records. Use the checklist to find your weak areas a week before the interview.
FAQs
How should I use these checklists?
Answer each question aloud or on paper before reading the answer.
For coding questions, try writing the solution without an IDE first. Then compare your approach with the example and revisit the linked tutorial for anything you missed.
This helps you identify whether you have a knowledge gap, a coding-speed problem, or difficulty explaining your reasoning during an interview.
Which status code represents Service Unavailable?
503 — Service Unavailable.
It generally indicates that the server is temporarily unable to handle the request.
How do you read the value typed into a text box?
Use:
element.getAttribute("value");
or:
element.getDomProperty("value");
getText() should not normally be used to retrieve the entered value of an <input> element.
Where can I find more company-specific questions?
You can use the company-specific guides above and the broader Company-Wise Interview Questions collection for additional automation testing and SDET interview preparation.