Selenium Flashcards
What is a webdriver API?
A driver API to work with different browsers
- ChromeDriver
- FirefoxDriver
- IPhoneDriver
How do you wait for a page to load?
selenium.waitForPageToLoad();
or
WebDriverWait
How would you select any particular text using Webdriver
driver.findElement using xpath
How to handle popups in webdriver
- Switch control to the pop up
- press the button
- Control back to source page
What is process to start Chrome browser?
WebDriver driver = new ChromeDriver();
How do you do a right click operation in webdriver
Use the Actions class features
What is the difference between the close() and quit() methods in webdriver
close() - it closes the currently active browser window.
quit()- it will close all of the opened browser windows and the browser itself.
How would you differentiate between the absolute and relative XPath?
Single slash “/” signifies an absolute XPath.
Double Slash “//” represents the relative XPath.
What is TestNG?
TestNG in Selenium is a Java testing framework, inspired by JUnit and NUnit. … From simple unit testing to complex integrated testing, it is designed to simplify all our testing requirements such as functional testing, regression, end-to-end testing, and more.