Performing Double-click events with WebDriver : Using the Actions class

I’m writing some test that involves the  capability of using double-click events in TeamMentor to open that article in a new tab or in a new page (more about his later).

Given the articles list, I wanted to select a row from the following table and raise the double-click event:

Doubleclick

From a WebDriver stand point, it can be achieved by using the Actions class , the following code snippet show how to do it.

WebDriver

 

In this particular case, this action opens up a new window or tab depending on the browser you are testing with.

 

Advertisements

About Michael Hidalgo

Michael is a Software Developer Engineer based on San José, Costa Rica. He leads the OWASP Chapter from Costa Rica. You can take a look at my blog at http://blog.michaelhidalgo.info/
This entry was posted in Browser Automation, WebDriver and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s