Selenium Interview: How to double click in Selenium WebDriver?

How would you double click in Selenium ?

It’s very simple. You just need few lines of code.

You will need to use Actions class .

Here is the sample code:

 

Explanation: 

  1. We need to create the object of Actions class and use the double click method.
  2. Now, we have to make our action , so that can be done using build() method.
  3. well, if action is ready, you just need to call perform() method.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *