i
Cognizant
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
Absolute Xpath starts from the root element, while relative Xpath starts from any node in the DOM structure.
Absolute Xpath starts with a single forward slash (/) and starts selection from the root node.
Relative Xpath starts with a double forward slash (//) and starts selection from the current node or any node in the DOM structure.
Absolute Xpath is more brittle and prone to breaking if the structure of the page changes...
The return would be the number of tabs open in the browser.
The return value would be an integer representing the count of open tabs.
For example, if there are 5 tabs open, the return value would be 5.
Types of waits in Selenium include Implicit Wait, Explicit Wait, and Fluent Wait.
Implicit Wait: Waits for a certain amount of time before throwing a NoSuchElementException.
Explicit Wait: Waits for a certain condition to occur before proceeding further in the code.
Fluent Wait: Waits for a condition to be true with a defined polling frequency.
Example: driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
Exceptions in Selenium are errors that occur during test execution, disrupting the flow of the test script.
Exceptions are thrown when there is an unexpected behavior in the application under test or in the test script itself.
Common exceptions in Selenium include NoSuchElementException, ElementNotVisibleException, TimeoutException, and StaleElementReferenceException.
Handling exceptions in Selenium can be done using try-...
Feature files contain high-level description of the functionality to be tested, while step definitions are the implementation of the steps in the feature file using code.
Feature files are written in Gherkin syntax and describe the behavior of the application in plain text.
Step definitions are written in programming languages like Java, Ruby, etc., and map the steps in the feature file to automation code.
Feature files a...
Data can be input in Cucumber using feature files and step definitions.
Data can be input in feature files using scenarios and scenario outlines
Step definitions can be used to define the actions to be taken with the input data
Data tables can be used in feature files to input structured data
Examples keyword can be used in scenario outlines to provide multiple sets of input data
Test case is a set of conditions or variables under which a tester will determine whether a system under test satisfies requirements. Test plan is a document outlining the scope, approach, resources, and schedule of testing activities. Test scenarios are detailed descriptions of possible interactions with the system.
Test case: specific conditions to be tested, expected results, steps to execute
Test plan: overall strate...
Hooks in Java are methods that allow subclasses to override or extend the behavior of a superclass.
Hooks are commonly used in frameworks like JUnit and TestNG for test automation.
They are often used for setup and teardown operations before and after test methods.
Examples include @Before, @After, @BeforeClass, and @AfterClass annotations in JUnit.
I applied via Naukri.com and was interviewed in Oct 2024. There was 1 interview round.
Program to reverse an array of strings
Iterate through each string in the array and reverse it using built-in functions or manual reversal logic
Store the reversed strings in a new array or overwrite the original array
Return the reversed array of strings
CRM stands for Customer Relationship Management. It refers to strategies, technologies, and practices that companies use to manage and analyze customer interactions and data throughout the customer lifecycle.
CRM helps businesses build and maintain relationships with customers
It involves using technology to organize, automate, and synchronize sales, marketing, customer service, and technical support
Examples of CRM softw
Data provider in TestNG is used to supply test data to test methods.
Data provider is a method annotated with @DataProvider that returns a 2D array of test data.
Test methods can be linked to data provider using 'dataProvider' attribute in @Test annotation.
Data provider helps in running the same test method with multiple sets of data.
It helps in data-driven testing where test data is separated from test logic.
Yes, dynamic xpath can be created using functions like contains, starts-with, and variables.
Use functions like contains() and starts-with() to create dynamic xpaths based on partial attribute values
Use variables to store dynamic values and use them in xpaths
Example: //div[contains(@class, 'dynamicClass')]
Example: //input[starts-with(@id, 'dynamicId')]
I applied via Company Website and was interviewed in Aug 2024. There was 1 interview round.
Use libraries like Jackson or Gson to convert JSON file into Java object
Use libraries like Jackson or Gson for easy conversion
Create a POJO class that represents the structure of JSON data
Use ObjectMapper class in Jackson or Gson.fromJson() method to convert JSON file into Java object
Different annotations used in JUnit hooks
Annotations like @Before, @After, @BeforeClass, @AfterClass are used in JUnit hooks
These annotations help in setting up and tearing down test fixtures before and after test methods
Example: @Before public void setUp() { // setup code }
Background keyword in BDD is used to define preconditions for a scenario
Background keyword is used to define steps that are common to all scenarios in a feature file
It helps in reducing duplication of steps in scenarios
Background keyword is placed before the first scenario in a feature file
Different types of exceptions encountered while executing test cases
1. Checked exceptions: Must be caught or declared in the method signature
2. Unchecked exceptions: Not required to be caught or declared
3. Runtime exceptions: Occur during runtime due to logical errors
4. Assertion errors: Failures in assertions made in the test cases
5. Timeout exceptions: Test case takes longer than expected to complete
Drag and Drop is a common interaction in web applications where a user can click and drag an element to a new location.
Drag and Drop is implemented using HTML5's Drag and Drop API.
The syntax involves setting the draggable attribute to true on the element you want to drag.
You also need to define event handlers for dragstart, dragover, and drop events.
Example:
Pinch and zoom syntax is used to zoom in and out on touch screen devices.
Use two fingers to pinch inwards to zoom out
Use two fingers to pinch outwards to zoom in
For zooming, use the 'transform' property in CSS
What people are saying about Cognizant
I applied via Referral and was interviewed in Aug 2024. There was 1 interview round.
Oops Concept from Java refers to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Polymorphism allows objects to be treated as instances of their parent class.
Abstraction hides the implementation...
Developed automation test scripts for web applications using Selenium and Java
Created test cases based on requirements and executed them using Selenium WebDriver
Performed regression testing to ensure the stability of the application
Collaborated with developers to identify and resolve defects
Used TestNG framework for test execution and reporting
Implemented data-driven testing using Excel sheets for input data
Cognizant interview questions for designations
I applied via Naukri.com and was interviewed in Jul 2024. There were 2 interview rounds.
findElement returns the first matching element on the page, while findElements returns a list of all matching elements.
findElement returns a single WebElement matching the specified locator, while findElements returns a list of WebElements.
findElement will throw NoSuchElementException if no matching element is found, while findElements will return an empty list.
Example: driver.findElement(By.id("username")) vs driver.f
Implicit wait is set globally for the entire duration of the WebDriver session, while explicit wait is applied only to specific elements.
Implicit wait is set using driver.manage().timeouts().implicitlyWait() method, while explicit wait is implemented using WebDriverWait class in Selenium.
Implicit wait is used to wait for elements to be present in the DOM, while explicit wait is used to wait for specific conditions to b...
I am a dedicated Automation Test Engineer with 5 years of experience in creating and executing test cases for software applications.
Experienced in creating automated test scripts using tools like Selenium and Appium
Proficient in identifying bugs and issues in software applications
Skilled in writing test plans and test cases to ensure comprehensive test coverage
Strong understanding of Agile methodologies and continuous ...
Get interview-ready with Top Cognizant Interview Questions
I applied via Job Portal
Java program to reverse a number
Use modulus operator to extract the last digit of the number
Multiply the reversed number by 10 and add the extracted digit
Repeat until all digits are processed
I applied via LinkedIn and was interviewed in Mar 2024. There was 1 interview round.
Authentication is the process of verifying the identity of a user, while authorization is the process of determining what resources a user can access.
Authentication verifies the identity of a user, usually through a username and password.
Authorization determines what resources a user can access after they have been authenticated.
Authentication is the first step in the security process, while authorization comes after a...
1 Interview rounds
based on 101 reviews
Rating in categories
Associate
72.2k
salaries
| ₹5.1 L/yr - ₹15.9 L/yr |
Programmer Analyst
55.2k
salaries
| ₹2.4 L/yr - ₹9.6 L/yr |
Senior Associate
48.2k
salaries
| ₹9 L/yr - ₹27 L/yr |
Senior Processing Executive
28.5k
salaries
| ₹1.8 L/yr - ₹9 L/yr |
Technical Lead
17.5k
salaries
| ₹5.9 L/yr - ₹24 L/yr |
TCS
Infosys
Wipro
Accenture