Capgemini
Winners Institute of Communicative English Interview Questions and Answers
Q1. Explain what is Background keyword in BDD
Background keyword in BDD is used to define common steps that are executed before each scenario in a feature file.
Background keyword is used to reduce duplication of common steps in scenarios.
It is placed at the beginning of a feature file before scenarios.
All steps defined under Background keyword are executed before each scenario in the feature file.
It helps in maintaining consistency and readability of feature files.
Example: If all scenarios in a feature file require loggi...read more
Q2. Explain The Framework work use in Project
The framework used in the project is a combination of data-driven and keyword-driven frameworks.
The framework allows for easy maintenance and scalability of test cases.
It separates test data from test scripts, making it easier to update test data without changing the scripts.
Reusable functions and libraries are used to reduce redundancy in test scripts.
Test cases are written in a modular fashion, allowing for easy debugging and troubleshooting.
Automation tools like Selenium a...read more
Q3. Write java program to Reverse the String
Java program to reverse a string
Create a char array from the input string
Use two pointers to swap characters from start and end of the array
Convert the char array back to a string and return
Q4. What is Desired Capabilities
Desired Capabilities are a set of key-value pairs used to configure the WebDriver browser during test automation.
Used to set properties for WebDriver browser
Can be used to configure browser settings like browser name, version, platform, etc.
Helps in customizing the behavior of the browser during automation tests
Q5. What is Hooks in BDD
Hooks in BDD are special methods that allow for setup and teardown actions before and after scenarios in test automation.
Hooks are used to perform actions before and after scenarios in BDD tests.
They can be used for setup (Before) and teardown (After) actions.
Hooks help in reducing code duplication and improving test maintenance.
Examples include setting up test data before a scenario and cleaning up resources after a scenario.
Q6. DIFferent Exceptions in Selenium
Different exceptions in Selenium include NoSuchElementException, ElementNotVisibleException, StaleElementReferenceException, TimeoutException, and WebDriverException.
NoSuchElementException: Thrown when an element could not be found in the DOM.
ElementNotVisibleException: Thrown when an element is present in the DOM but not visible.
StaleElementReferenceException: Thrown when the element is no longer attached to the DOM.
TimeoutException: Thrown when a command does not complete i...read more
Q7. Write logic for prime number
A prime number is a number greater than 1 that has no positive divisors other than 1 and itself.
Start by checking if the number is less than 2, if so it is not a prime number
Loop through numbers from 2 to the square root of the number and check if the number is divisible by any of them
If the number is not divisible by any number in the loop, then it is a prime number
Q8. map sorting based on values
Sorting a map based on values
Use a TreeMap to automatically sort a map based on values
Implement a custom Comparator to sort the map based on values
Convert the map to a list of entries, then sort the list based on values
Q9. reverse of string
Reverse a string by iterating through each character and appending to a new string.
Iterate through each character of the input string
Append each character to a new string in reverse order
Return the reversed string
More about working at Capgemini
Interview Process at Winners Institute of Communicative English
Top Automation Tester Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month