Chapter 5

  1. True or false – the drag and drop action requires the source element and the target element.

True.

  1. List the keyboard methods that we can perform using the actions API.

sendKeys(), keyUp(), and keyDown().

  1. Which method of the actions API will help in performing a double-click operation?

doubleClick(WebElement target).

  1. Using the actions API, how can we perform a save option (that is to say, Ctrl + S)?

new Actions(driver) .sendKeys(Keys.chord(Keys.CONTROL, "s")) .perform();.

  1. How can we open a context menu using the actions API?

By calling the contextClick() method.

Get Selenium WebDriver 3 Practical Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.