Add office photos
Engaged Employer

Cognizant

3.8
based on 49.8k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

10+ Kody Equipments Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. What is the different get and quit methods?

Ans.

The get method is used to retrieve a value from a data structure, while the quit method is used to terminate a program or session.

  • The get method is commonly used in programming languages to access elements from arrays, lists, dictionaries, etc.

  • The quit method is typically used to gracefully exit a program or session, closing any open resources or connections.

  • Example: In Python, the get method is used to retrieve values from dictionaries, while the quit method is used to exit ...read more

View 1 answer

Q2. How to skip a specific test case in TestNG?

Ans.

How to skip a specific test case in TestNG?

  • Use @Test(enabled = false) annotation to skip a test case

  • Use @Test(groups = {"skip"}) annotation and exclude the group from test execution

  • Use ITestResult.SKIP status to skip a test case programmatically

Add your answer

Q3. Explain the exception handling process in your project?

Ans.

Exception handling process involves identifying, catching, and handling errors in the software.

  • Identify potential exceptions and define exception classes

  • Catch exceptions using try-catch blocks

  • Handle exceptions appropriately, either by logging or displaying error messages

  • Implement a fallback mechanism to handle unexpected exceptions

  • Test exception handling scenarios thoroughly

Add your answer

Q4. Explain the order of TestNG annotations execution flow?

Ans.

TestNG annotations are executed in a specific order to ensure proper test execution.

  • BeforeSuite

  • BeforeTest

  • BeforeClass

  • BeforeMethod

  • Test

  • AfterMethod

  • AfterClass

  • AfterTest

  • AfterSuite

Add your answer
Discover Kody Equipments interview dos and don'ts from real experiences

Q5. Difference between absolute Xpath and relative Xpath?

Ans.

Absolute Xpath is the complete path from the root element while relative Xpath is the path from the current element.

  • Absolute Xpath starts with a single forward slash (/) and is used to locate an element from the root node.

  • Relative Xpath starts with a double forward slash (//) and is used to locate an element from the current node.

  • Absolute Xpath is more specific and less flexible while relative Xpath is more flexible and less specific.

  • Example of Absolute Xpath: /html/body/div[...read more

Add your answer

Q6. Difference between scenario & scenario outline?

Ans.

Scenario outlines are templates for scenarios with placeholders for input values.

  • Scenario outlines are used in BDD frameworks like Cucumber.

  • They allow for the creation of multiple scenarios with different input values.

  • Scenario outlines use placeholders like to represent input values.

  • Example: Given a with , when they log in, then they should see the .

  • Scenario outlines are more flexible and reusable than regular scenarios.

Add your answer

Q7. Explain execution flow of cucumber framework?

Ans.

Cucumber framework executes feature files using step definitions and generates reports.

  • Cucumber reads feature files written in Gherkin syntax

  • Step definitions are written in programming language

  • Cucumber matches steps in feature file with step definitions

  • Cucumber generates reports after execution

Add your answer

Q8. How to select check box in selenium?

Ans.

To select a checkbox in Selenium, locate the checkbox element and use the 'click' method.

  • Locate the checkbox element using any of the available locators in Selenium

  • Use the 'click' method to select the checkbox

  • Verify that the checkbox is selected using the 'isSelected' method

Add your answer

Q9. Difference between Overloading & Overriding?

Ans.

Overloading is having multiple methods with the same name but different parameters. Overriding is having a method in a subclass with the same name and parameters as a method in its superclass.

  • Overloading is compile-time polymorphism while overriding is runtime polymorphism.

  • Overloading is used to provide different implementations of the same method for different input parameters.

  • Overriding is used to provide a specific implementation of a method that is already provided by its...read more

Add your answer

Q10. Explain TakescreenShot sudo code?

Ans.

TakescreenShot sudo code captures the screen and saves it as an image file.

  • Import necessary libraries for capturing the screen and saving images

  • Define a function to capture the screen

  • Specify the file format and location to save the screenshot

  • Call the function to capture and save the screenshot

View 1 answer

More about working at Cognizant

Top Rated Mega Company - 2024
Top Rated IT/ITES Company - 2024
HQ - Teaneck. New Jersey., United States (USA)
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter