O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What is the Advanced User Interactions

The Advanced User Interactions API is a new, more comprehensive API for describing actions a user can perform on a web page. Normally we need to find elements and then send actions through them. If we need to perform complex tasks like hold down Control and click, then this may not work.

The Advanced User Interactions allows us to build these complex interactions with elements in a really nice API. The API relies on two key interfaces for this to work.

Keyboard

The keyboard interface allows keys to be pressed, held down, and released. It also allows for normal typing.

Methods available are:

  • void sendKeys(CharSequence... keysToSend): Similar to the existing sendKeys(...) method.
  • void pressKey(Keys keyToPress)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required