
Xoriant

10+ Xoriant Automation Test Engineer Interview Questions and Answers
Q1. If priority of test is -1, 0, 1. which executes first.
Test with priority 1 executes first, followed by 0 and then -1.
Tests with higher priority are executed first
Priority can be used to determine the order of execution
Priority can be set in test management tools like JIRA or TestRail
Q2. How to take multiple values from dropdown , write the code
To take multiple values from dropdown, use a loop to iterate through each option and select them.
Identify the dropdown element using its locator
Use the Select class to create an object for the dropdown
Use the getOptions() method to get all the options in the dropdown
Iterate through the options using a loop and select each option using the selectByVisibleText() or selectByValue() method
Q3. Why I am getting elementNotPresent exception even element present on Page. Please explain
ElementNotPresent exception occurs even if element is present on page. Why?
The element may not be loaded yet, so wait for it to load before checking
The element may be hidden or not visible on the page
The element may have a different name or ID than expected
The element may be in an iframe or shadow DOM
The element may have been removed or deleted from the page
Q4. How to take failed test screenshots
Failed test screenshots can be taken using automation tools and saved in a designated folder.
Use automation tools like Selenium or Appium to capture screenshots on test failure
Save the screenshots in a designated folder for easy access and reference
Include the screenshot file name in the test report for better traceability
Q5. Explain Automation Framework in your project
Our automation framework is built using Selenium WebDriver and TestNG.
We use Page Object Model design pattern for better maintainability.
We have created custom libraries for common functions like login, logout, etc.
We use Jenkins for continuous integration and execution of automated tests.
We have implemented data-driven testing using Excel sheets.
We use Git for version control and collaboration among team members.
Q6. How to Handle Alerts in Selenium
Alerts can be handled using Alert interface in Selenium
Use driver.switchTo().alert() method to switch to alert
Use getText() method to get the text of the alert
Use accept() method to click on OK button of the alert
Use dismiss() method to click on Cancel button of the alert
Q7. Sequence of Execution of TestNG Annotation
TestNG annotations are executed in a specific sequence during test execution.
BeforeSuite
BeforeTest
BeforeClass
BeforeMethod
Test
AfterMethod
AfterClass
AfterTest
AfterSuite
Q8. How to switch default frame
To switch default frame in automation testing, use switchTo() method of WebDriver class.
Use driver.switchTo().frame() method to switch to a specific frame by index, name, or WebElement.
Use driver.switchTo().defaultContent() method to switch back to the default content.
Example: driver.switchTo().frame(0); //switch to first frame
Example: driver.switchTo().frame("frameName"); //switch to frame with name "frameName"
Q9. How to handle Iframe
To handle Iframe, switch to the frame using driver.switchTo().frame() method.
Identify the Iframe using its ID, name, or index
Switch to the Iframe using driver.switchTo().frame() method
Perform the required actions inside the Iframe
Switch back to the default content using driver.switchTo().defaultContent() method
Q10. Explain GetOption() method
GetOption() method is used to retrieve the value of a selected option in a dropdown list.
GetOption() method is commonly used in automated testing to verify if the correct option is selected in a dropdown list.
The method returns the value of the selected option as a string.
If no option is selected, the method returns null or an empty string.
Q11. Different types of Exception
Different types of exceptions include checked, unchecked, runtime, and error.
Checked exceptions are checked at compile time and must be handled or declared.
Unchecked exceptions are not checked at compile time and do not need to be handled or declared.
Runtime exceptions are unchecked exceptions that occur during runtime.
Errors are serious problems that cannot be handled by the program, such as OutOfMemoryError.
Q12. Types of Asserts
Asserts are used to verify expected results in automated tests. There are various types of asserts.
Assert.AreEqual - compares two values for equality
Assert.IsTrue/False - checks if a condition is true/false
Assert.IsNull/NotNull - checks if a value is null/not null
Assert.ThrowsException - checks if an exception is thrown
Assert.AreSame - checks if two objects refer to the same instance
Assert.AreNotSame - checks if two objects do not refer to the same instance
More about working at Xoriant

Interview Process at Xoriant Automation Test Engineer

Top Automation Test Engineer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

