Deloitte
10+ DotPe Interview Questions and Answers
Q1. How to move to another tabs in selenium
To move to another tab in Selenium, switch to the desired tab using window handles.
Use getWindowHandles() to get all window handles
Switch to the desired tab using switchTo().window(handle)
Q2. Write a java code to print sum of 100 numbers
Java code to print sum of 100 numbers
Create an array of 100 numbers
Use a loop to iterate through the array and calculate the sum
Print the sum at the end
Q3. Automate a test case for Makemytrip website
Automate a test case for Makemytrip website
Use Selenium WebDriver to automate the test case
Identify the test scenario, such as searching for a flight
Write test scripts in a programming language like Java or Python
Use test data to validate the functionality of the website
Implement assertions to verify expected outcomes
Q4. Write a count of K char in your name
My name is John Doe. There are 1 'o' in my name.
Count the occurrences of the specified character in the name
Iterate through each character in the name and compare with the specified character
Increment a counter each time the specified character is found
Q5. explicit,implicit,fluent waits def
Explicit, implicit, and fluent waits are different types of waits used in automation testing to handle synchronization issues.
Explicit wait is used to wait for a certain condition to be met before proceeding with the test execution. It is defined by the tester in the code.
Implicit wait is used to wait for a certain amount of time before throwing an exception if the element is not found. It is defined globally for the entire test script.
Fluent wait is a combination of explicit...read more
Q6. Different automation tools
Automation tools are software programs used to automate testing tasks.
Selenium
Appium
TestComplete
Robot Framework
HP UFT
Cypress
Q7. action class in selenium
Action class in Selenium is used to perform complex user interactions like drag and drop, double click, etc.
Action class is part of the Selenium WebDriver API
It is used to perform advanced user interactions like drag and drop, double click, etc.
Actions class is instantiated by creating an object of Actions class and passing the WebDriver instance as a parameter
Actions class methods include moveToElement, click, contextClick, dragAndDrop, etc.
Q8. Select class in selenium
In Selenium, the Select class is used to work with dropdown elements on a web page.
The Select class is part of the org.openqa.selenium.support.ui package
It provides methods to interact with dropdown elements such as selecting options by visible text, value, or index
To use the Select class, you first need to locate the dropdown element using a locator like ID, name, or class name
Q9. Locatord in selenium
Locator in Selenium is used to identify web elements on a web page.
Locators are used to find and interact with elements on a web page.
Common locators include ID, name, class name, tag name, link text, and partial link text.
XPath and CSS selectors are also commonly used locators in Selenium.
Example: driver.findElement(By.id("username"));
Q10. waits in selenium
Waits in Selenium are used to synchronize the test execution with the application's behavior.
Waits help in handling synchronization issues between test scripts and web elements
Types of waits in Selenium include Implicit Wait, Explicit Wait, and Fluent Wait
Example: WebDriverWait wait = new WebDriverWait(driver, 10); wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("elementID")));
More about working at Deloitte
Top Automation Test Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month