Capgemini
Rajagiri Hospital Interview Questions and Answers
Q1. Write a java program to remove the character which repeats in a string
Java program to remove repeating characters in a string
Create a new string to store the result
Iterate through each character in the input string
Check if the character is already present in the result string before adding it
Return the final result string
Q2. Difference between scenario and scenario outline
Scenario is a single test case while scenario outline is a template for multiple test cases with different inputs
Scenario is a single test case with specific inputs and expected outcomes
Scenario outline is a template for multiple test cases with placeholders for different inputs
Scenario outline uses Examples keyword to provide different sets of inputs for each test case
Q3. How to pass authorisation dynamically
Passing authorization dynamically involves generating and sending tokens or credentials at runtime.
Use token-based authentication to generate and pass tokens dynamically
Implement OAuth for secure authorization handling
Utilize JWT (JSON Web Tokens) for passing authorization dynamically
Q4. What is an array
An array is a data structure that stores a collection of elements of the same type in a contiguous block of memory.
Arrays have a fixed size determined at the time of declaration.
Elements in an array are accessed using an index starting from 0.
Example: ['apple', 'banana', 'orange']
Q5. Xpath for dynamic elements
Xpath is used to locate elements in XML/HTML documents. For dynamic elements, use functions like contains, starts-with, or position.
Use contains() function to locate elements with partial attribute values
Use starts-with() function to locate elements with attribute values starting with a specific string
Use position() function to locate elements based on their position in the document
Q6. Reverse a integer
To reverse an integer, convert it to a string, reverse the string, and convert it back to an integer.
Convert the integer to a string
Reverse the string
Convert the reversed string back to an integer
More about working at Capgemini
Interview Process at Rajagiri Hospital
Reviews
Interviews
Salaries
Users/Month