Module 1: TCS & Infosys QA Interview Questions (Q1 - Q9)
Click to Expand/Collapse
1. TCS QA Question: What is the difference between findElement() and findElements() in Selenium WebDriver?
ANSWER: findElement(): Returns the first matching single
WebElement on the current web page. If no element is found, it throws
NoSuchElementException.
findElements(): Returns a
List<WebElement> containing all matching elements. If no elements match the locator, it returns an empty list (never throws an exception).
Hinglish: TCS interviews mein yeh standard question hai.
findElement() error throw karta hai agar element na mile, jabki
findElements() empty list return karta hai.
π Real TCS Note: Asked in TCS Ninja & Digital QA Technical Round 1.
2. TCS Question: How do you handle Dynamic WebTables in Selenium Java?
ANSWER: Use dynamic XPath iterating over table rows //table[@id='data']/tbody/tr using size(), and extract cell value via //tr[i]/td[j].
3. Infosys Question: How do you implement Page Object Model (POM) with PageFactory in Java?
ANSWER: Declare elements with @FindBy(id="login") and initialize in constructor using PageFactory.initElements(driver, this).
4. Infosys Question: What is TestNG DataProvider and how do you achieve Data-Driven Testing?
ANSWER: Annotate a method returning Object[][] with @DataProvider and pass dataProvider = "name" to @Test.
5. TCS Question: What is the difference between Implicit Wait and Explicit Wait in Selenium?
ANSWER: Implicit Wait applies globally to all elements. Explicit Wait targets specific elements with conditions like elementToBeClickable().
6. Infosys Question: How do you handle Dropdowns without using Select class in Selenium?
ANSWER: Fetch dropdown options into List<WebElement> using findElements() and iterate with a for-each loop to click matching option text.
7. TCS Question: Explain the Defect Life Cycle and status changes in Jira.
ANSWER: New → Open → Assigned → Fixed → Pending Retest → Closed (or Reopened if fix fails).
8. Infosys Question: What is the difference between SoftAssert and HardAssert in TestNG?
ANSWER: HardAssert stops execution immediately upon failure. SoftAssert continues test execution and logs all failures when assertAll() is called.
9. TCS Question: How do you execute SQL JOINs to verify database test data?
ANSWER: Use INNER JOIN to fetch matching records across Users and Orders tables, verifying DB record updates after UI submission.
Module 2: High-Growth Product & Fintech Startup Q&As (Q10 - Q18)
Click to Expand/Collapse
10. Razorpay / Paytm Question: How do you automate REST API authentication using REST Assured BDD?
ANSWER: Extract token from auth endpoint response:
String token = given().contentType("application/json")
.body(authJson).when().post("/api/v1/auth")
.then().extract().path("accessToken");
given().header("Authorization", "Bearer " + token)
.when().get("/api/v1/payments")
.then().statusCode(200);
11. Swiggy Question: How do you write a Java program to check if two Strings are Anagrams?
ANSWER: Convert both strings to char arrays, sort using Arrays.sort(), and compare equality with Arrays.equals().
12. Fintech Question: How do you test Idempotency in Payment Gateway APIs?
ANSWER: Send identical POST payment requests with the same Idempotency-Key header to ensure the customer balance is debited only once.
13. Startup SDET Question: How do you setup Docker containers for Selenium Grid parallel testing?
ANSWER: Deploy docker-compose.yml spinning up a Selenium Hub container and Chrome/Firefox worker node containers.
14. Startup Question: How do you perform API Mocking using WireMock in test suites?
ANSWER: Stub third-party APIs using stubFor(get(urlEqualTo("/payment")).willReturn(aResponse().withStatus(200))).
15. SaaS Product Question: How do you handle JWT Token Expiration during API automation?
ANSWER: Implement an auto-refresh token utility method that checks token expiration timestamp before executing request calls.
16. Startup Question: What is the difference between Playwright and Selenium for modern web apps?
ANSWER: Playwright operates via WebSocket Chrome DevTools Protocol (CDP) for faster execution and automatic waiting, whereas Selenium uses HTTP JSON Wire Protocol.
17. Fintech Question: How do you perform Load & Stress Testing on Microservice APIs?
ANSWER: Configure Apache JMeter or k6 scripts simulating 1,000 concurrent virtual users to measure throughput (RPS) and p99 latency.
18. Startup Question: How do you achieve Shift-Left Testing in fast-paced 2-week Sprints?
ANSWER: Review user stories during grooming, write acceptance test cases before dev coding starts (TDD/BDD), and mock backend endpoints.
Module 3: Wipro, Cognizant & Accenture Enterprise Q&As (Q19 - Q27)
Click to Expand/Collapse
19. Wipro Question: How do you structure a Cucumber BDD Feature File and Step Definitions?
ANSWER: Write Gherkin syntax in .feature files (Given, When, Then) and map to Java step methods using @Given("^user is on login page$").
20. Cognizant Question: How do you generate ExtentReports in TestNG automation suites?
ANSWER: Implement TestNG ITestListener interface, initializing ExtentReports in onStart() and capturing screenshots on failure in onTestFailure().
21. Accenture Question: How do you achieve Parallel Execution in TestNG via testng.xml?
ANSWER: Set parallel="methods" or parallel="classes" with thread-count="5" in testng.xml suite file.
22. Wipro Question: How do you handle Window Handles and Popups in Selenium Java?
ANSWER: Store parent handle driver.getWindowHandle() and switch to child popup using driver.switchTo().window(handle) iterating getWindowHandles().
23. Cognizant Question: What is Maven pom.xml and how do you manage dependencies and plugins?
ANSWER: Project Object Model (POM) configuration specifying dependency JAR versions and Maven Surefire plugin for test execution.
24. Accenture Question: How do you automate Web Tables with pagination in Selenium?
ANSWER: Use a do-while loop iterating through table rows per page, clicking 'Next' pagination button until target record is found or Next button is disabled.
25. Wipro Question: How do you perform Cross-Browser Testing using Selenium Grid?
ANSWER: Pass DesiredCapabilities / ChromeOptions to RemoteWebDriver URL pointing to Selenium Hub grid.
26. Cognizant Question: How do you handle iFrames in Selenium Java?
ANSWER: Switch using driver.switchTo().frame(index/id/element) and return to main page via driver.switchTo().defaultContent().
27. Accenture Question: How do you execute JavaScript code in Selenium using JavascriptExecutor?
ANSWER: Cast driver: JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("arguments[0].click();", element);.
Module 4: Big Tech / MAANG (Amazon, Google, Microsoft) Q&As (Q28 - Q36)
Click to Expand/Collapse
28. Amazon QAE Question: "How Would You Test an Amazon Vending Machine?"
ANSWER: Categorize into test types:
- Functional: Coin/Note/Card acceptance, exact change return, item dispensation.
- Boundary / Edge: Expired products, damaged coins, power interruption mid-vend.
- Hardware / Sensor: Drop sensor verification, inventory stock counter sync.
- Security & Network: Encrypted card reader payload, offline mode transaction buffer.
29. Amazon Question: How do you design a Scalable Automation Architecture for Global Apps?
ANSWER: Explain microservices test decoupling, parallel cloud test grid execution (SauceLabs/BrowserStack), and automated contract testing (Pact).
30. Google Question: How do you test a Search Auto-Suggest Box with High Concurrency?
ANSWER: Test debounce timers (300ms delay), cache hits in Redis, special character injection (SQLi/XSS), and response latency under 50ms.
31. Microsoft Question: How do you automate Desktop Windows Applications using Appium WinAppDriver?
ANSWER: Use WinAppDriver service targeting application executable path and locate native elements using accessibility IDs.
32. Amazon Question: Demonstrate Amazon Leadership Principle 'Customer Obsession' in QA testing.
ANSWER: Share a scenario where you caught a subtle UI layout overlap on low-end mobile devices that prevented 5% of users from completing checkout.
33. Amazon Question: How do you solve the 'Two Sum' problem in Java for Live Coding rounds?
ANSWER: Use a HashMap<Integer, Integer> for O(n) time complexity storing complement target - nums[i].
34. Google Question: What is Flaky Test Management and how do you track test health?
ANSWER: Quarantine flaky tests automatically, track flakiness rate in dashboards, and enforce SLA fixes before merging to main branch.
35. Microsoft Question: How do you test WebSockets for real-time chat applications?
ANSWER: Establish WebSocket connection using ws:// protocol, verify bidirectional frame messages, and test auto-reconnect on network loss.
36. Amazon Question: Demonstrate Amazon Leadership Principle 'Bias for Action' in QA testing.
ANSWER: Describe taking calculated initiative to build an automated API sanity test suite overnight during a critical outage.
Module 5: HR Negotiation & Offer Countering Strategy (Q37 - Q45)
Click to Expand/Collapse
37. How do you negotiate a 40-50% CTC hike when moving from a Service MNC to a Product Startup?
ANSWER: Highlight your multi-stack capabilities (Java + Selenium + REST Assured + CI/CD) and benchmark against startup salary standards rather than legacy MNC pay bands.
38. How do you handle HR asking for your 3-Month Pay Slips during offer negotiation?
ANSWER: Provide pay slips transparently but steer negotiation around market value for SDET skills: "My current salary was fixed under legacy service band criteria, whereas my SDET automation skillset commands current market rate."
39. What is the best way to handle a 90-Day Notice Period requirement in Indian IT companies?
ANSWER: Inform recruiters upfront that you have accumulated leaves eligible for buyout or explore official notice period buyout options.
40. How do you leverage a Counter-Offer from another company to increase your CTC offer?
ANSWER: Inform HR respectfully: "I have received an offer for X LPA from Company B. However, your team and project scope is my top choice. If you can match X LPA, I am ready to accept immediately."
41. What is Variable Pay vs Fixed Pay and how should you evaluate total CTC offers?
ANSWER: Fixed Pay is guaranteed monthly cash; Variable Pay depends on company performance. Prioritize offers with higher Fixed Pay component (80%+).
42. How do you answer "Why do you want to leave your current company after just 1 year?"
ANSWER: Frame around career growth: "My current role shifted towards project maintenance, and I am eager to contribute to full-stack automation framework architecture."
43. How do you handle HR questions about Relocation and Night Shift willingness?
ANSWER: Express flexibility while confirming hybrid/remote working policies and sprint timing expectations.
44. What are ESOPs (Employee Stock Options) and how do you evaluate startup equity offers?
ANSWER: ESOPs grant right to buy company shares at strike price over a 4-year vesting schedule (typically 1-year cliff).
45. How do you politely decline a job offer without burning professional bridges?
ANSWER: Send a prompt, appreciative email thanking the hiring team and stating you accepted an offer aligned with your immediate domain goals.