Technical Interview Process
Both companies generally follow a similar interview structure.
- Round 1: Technical Interview
- Round 2: Coding / Practical Round
- Round 3: HR Discussion
Cognizant
The interview mainly focuses on:
- Automation Framework
- Selenium
- Java
- API Testing
- Practical coding questions
Infosys
The interview targets candidates with 2–8 years of experience and includes:
- Technical discussion
- Coding round
- HR discussion
The Infosys document contains both short and detailed answers, which are included below.
Technical Round – Framework, Selenium & API
Cognizant Interview Questions
- Explain your automation framework.
- Explain the Page Object Model (POM).
- What is the difference between Implicit Wait and Explicit Wait?
- How do you test an API end-to-end?
- What are the common errors while testing APIs?
- How do you modify JSON request data?
- How do you add authentication to an API request?
Infosys Interview Questions
- Explain your project.
- Explain your roles and responsibilities.
- Explain your automation framework.
- Explain TestNG integration.
- How do you capture screenshots only for failed test cases?
Preparation References
Refer to the following sections from your own documentation.
| Topic | Reference |
|---|---|
| Automation Framework & POM | Project Cluster 1, Selenium Cluster 14 |
| Implicit vs Explicit Wait | Selenium Cluster 4 |
| API End-to-End Testing | API Testing Practical |
| REST Assured | REST Assured Set |
| JSON & Authentication | API Testing Practical |
| Screenshots on Failure | Company Cluster 1 (ITestListener) |
| Project Introduction | Project Clusters 4 & 5 |
Infosys Answer – Project Introduction (Short Version)
I am working on an E-commerce Web Application where customers can search products, add them to the cart, and place orders.
My responsibilities include:
- Functional Testing
- Selenium Automation using Java
- API Validation
- Defect Reporting
- End-to-End Quality Assurance
Coding Round
Cognizant Coding Questions
- Reverse each word in a string.
- Find duplicate words in a string.
- Find the longest substring without repeating characters.
- Automate a Calendar WebElement using Selenium.
- Read data from an Excel file.
Infosys Coding Question
Write Selenium code to identify Broken Links on a webpage.
The Infosys document includes a complete explanation covering:
- Required imports
- ChromeDriver setup
- Collecting all anchor (
href) links - Sending HTTP requests
- Validating HTTP response codes
- Identifying broken links
Preparation References
| Coding Topic | Reference |
|---|---|
| Excel Reading | Selenium Cluster 15 (Apache POI) |
| Calendar Automation | Selenium Practical Exercises – Cluster 6 |
| Broken Links | Infosys Document |
| String Programs | DSA Material |
HR Round
Infosys HR Questions
- Why do you want to change your current job?
- What is your expected salary?
- What is your notice period?
HR Preparation Notes
For salary discussions:
Mention a salary expectation based on your years of experience.
For notice period:
Always provide your actual current notice period.
For job change:
Keep your answer positive by focusing on career growth, learning opportunities, and new challenges instead of speaking negatively about your current employer.
Questions That Need Your Own Answers
The following topics do not have complete written answers in your uploaded documents.
Cognizant Coding
- Reverse each word in a string
- Find duplicate words in a string
- Longest substring without repeating characters
These can be answered using your DSA material.
Cognizant Selenium
- Complete Selenium code for Calendar WebElement automation
Your Selenium Practical document explains the approach, but the complete code snippet needs to be added.
Cognizant API
- Common errors while testing APIs
Add your own practical answer based on your experience before publishing.
Frequently Asked Questions
What interview rounds are conducted at Cognizant and Infosys?
Both companies generally conduct:
- Technical Round
- Coding / Practical Round
- HR Round
How do you capture screenshots only for failed test cases?
Implement an ITestListener and override the onTestFailure() method to capture screenshots whenever a test fails.
Reference: Company Cluster 1
What is the difference between Implicit Wait and Explicit Wait?
- Implicit Wait applies globally to all element searches.
- Explicit Wait waits for a specific condition on a particular element.
Reference: Selenium Cluster 4
How do you identify broken links using Selenium?
- Collect all anchor (
href) links. - Send an HTTP request to each URL.
- Validate the HTTP response code.
- Report links returning error status codes as broken.
This complete explanation is available in your Infosys document.
How should I answer salary and notice period questions?
- Mention a realistic salary expectation based on your experience.
- Always provide your actual notice period honestly.