Question set 21 to 30:
31. How to rerun failed test cases in Selenium using TestNG?
Click here to answer
32. What approach to take if clear() method is not working on a textbox?
sendKeys(Keys.chord(Keys.CONTROL,"a",Keys.DELETE));
33. How to run test case in parallel for multiple browsers?
<suite name="Automation Test Suite " parallel="tests" thread-count="2">
<test name="Automation Test CasesChrome">
<classes>
<class name="com.task.automation.testtwo.testone"/>
</classes>
</test>
<test name="Automation Test Casesfirefox">
<classes>
<class name="com.task.automation.testtwo.testfirefox"/>
</classes>
</test>
</suite>
34. Create a common method for Explicit wait to check element is visible or not?
public void waitForElementVisible(WebElement element, long timeout) {
try {
new WebDriverWait(driver, timeout).until(ExpectedConditions.visibilityOf(element));
} catch (ElementNotVisibleException e) {
Reporter.log(element.toString() + "is not visible");
Reporter.log(e.getStackTrace().toString());
}
}
Top API Interview Question 11-20
35. How to prepare automation test estimation ?
36. How to launch batch file from Selenium WebDriver?
Process batch = Runtime.getRuntime.exec("path of the batch file");
37. How to run selenium test from command line?
java -classpath ".;selenium-server-standalone-2.33.0.jar" SampleClass
38. What is the name of the super interface of the Webdriver?
Ans: SearchContext.
39. Explain some of the strategy you have followed while using xpath?
40. How to execute the testng test suite from the command line?
Ans: java -cp “C:\AutomationReinvented\testng \lib\*;C:\AutomationReinvented\testng\bin” org.testng.TestNG testng.xml
Question set 21 to 30:
Top API Interview Question 1-10
*************************************************
API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign
Java Related Interview Question Set
https://automationreinvented.blogspot.com/search/label/Java
GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT
Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions
Great informative blog! I am doing qa training so it is really helpful for me! Thanks for sharing these short questions! :)
ReplyDelete