Selenium Flashcards

1
Q

What is a webdriver API?

A

A driver API to work with different browsers

  • ChromeDriver
  • FirefoxDriver
  • IPhoneDriver
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you wait for a page to load?

A

selenium.waitForPageToLoad();
or
WebDriverWait

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How would you select any particular text using Webdriver

A

driver.findElement using xpath

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to handle popups in webdriver

A
  • Switch control to the pop up
  • press the button
  • Control back to source page
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is process to start Chrome browser?

A

WebDriver driver = new ChromeDriver();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you do a right click operation in webdriver

A

Use the Actions class features

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between the close() and quit() methods in webdriver

A

close() - it closes the currently active browser window.

quit()- it will close all of the opened browser windows and the browser itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How would you differentiate between the absolute and relative XPath?

A

Single slash “/” signifies an absolute XPath.

Double Slash “//” represents the relative XPath.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is TestNG?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly