How to perform double click using mouse actions in Selenium with Python?

0 votes
How to perform double click using mouse actions in Selenium with Python?
Jul 29 in Selenium by Harsh
134 views

1 answer to this question.

0 votes

Hi harsh, you can use ActionChains() class to perform any mouse or keyboard action. You can double click on a web element using these lines of code:

driver.get("https://edureka.co");
element_to_double_click = driver.find_element_by_xpath("//div[@class='container no-padding-xs hidden-xs']//h2[contains(text(),'Trending Courses')]")
actions = ActionChains(driver)
actions.double_click(element_to_double_click)
# perform the operation on the element
actions.perform()
answered Jul 29 by Abha
• 24,980 points

Related Questions In Selenium

0 votes
1 answer

How to click a span with given text using Selenium Python

If ALL_USA is subject to change, then ...READ MORE

answered Jul 26, 2018 in Selenium by Samarpit
• 5,130 points
1,913 views
0 votes
1 answer

How to perform mouse hovering in Selenium WebDriver (Java)?

You many not actually be able to ...READ MORE

answered Apr 3, 2018 in Selenium by nsv999
• 5,090 points

edited Apr 4, 2018 by nsv999 3,112 views
0 votes
1 answer

How to upload a resume to a website using selenium in python?

Use this code, this will help you: from ...READ MORE

answered Apr 20, 2018 in Selenium by Vardy
• 2,250 points
1,074 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
768 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,011 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
719 views
0 votes
1 answer

How can I perform mouse hover action in Selenium-Python?

Hey Payal, use the code snippet shown ...READ MORE

answered Jul 23 in Selenium by Abha
• 24,980 points
47 views