0% found this document useful (0 votes)
15 views9 pages

04 - 02 - Double Click and Right Click in Selenium With Examples

Uploaded by

minhtandragon29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views9 pages

04 - 02 - Double Click and Right Click in Selenium With Examples

Uploaded by

minhtandragon29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

RBVH/ENG1

Double click in Selenium


May-2019

Internal | RBVH/ENG1 | 6/24/2014 | © Robert Bosch Engineering and Business Solutions Vietnam Company Limited 2013. All
1
rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of
applications for industrial property rights.
Double click in Selenium
Double click action in Selenium web driver can be done using Actions class. Actions class is
a predefined class in Selenium web driver used to perform multiple keyboard and mouse
operations such as Right Click, Drag and Drop, etc.

Double click in Selenium using Actions class


Double click in Selenium
Example of Double Click

•Launch the URL: http://demo.guru99.com/test/simple_context_menu.html


•Double click on the button labelled 'Double-Click Me To See Alert'
•Click on OK button on the displayed alert
Double click in Selenium
Right-click in Selenium
Right click action in Selenium web driver can be done using Actions class. Right Click
operation is also called Context Click in Selenium. Pre-defined method context click
provided by Actions class is used to perform right click operation. Below is the code to
demonstrate right click operation using Actions class.
Right-click in Selenium
Right Click Example

1.Launch the URL: http://demo.guru99.com/test/simple_context_menu.html


2.Perform Right Click operation on the button : right click me
3.Click on Edit link on the displayed list of right click options
4.Click on OK button on the alert displayed
5.Close the browser
Right-click in Selenium
Summary
Actions class in Selenium is mostly used to perform complex keyboard and
mouse operations. Hence, Actions class is preferred compared to Javascript
for performing operations such as Right Click and Double Click in Selenium.
Right click operation is mostly used when performing right click on an
element opens a new menu. Right click operation in Selenium web driver
can be done using the pre defined command Context Click as mentioned
below

Double click operation is used when the state of web element changes after double click
operation. Double Click operation in Selenium web driver can be done using the pre
defined command Double Click as mentioned below
RBVH/ENG1

Reference
 https://www.guru99.com/double-click-and-right-click-selenium.html

Internal | RBVH/ENG1 | 6/24/2014 | © Robert Bosch Engineering and Business Solutions Vietnam Company Limited 2013. All
rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of
applications for industrial property rights.

You might also like