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, 2019 in Selenium by Harsh
2,231 views

1 answer to this question.

+1 vote

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, 2019 by Abha
• 28,140 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,910 points
7,275 views
+1 vote
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,500 points

edited Aug 22, 2023 by Khan Sarfaraz 10,758 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,360 points
2,882 views
0 votes
2 answers

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,500 points
13,674 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,143 views
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,910 points
7,221 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,875 views
0 votes
1 answer
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 24, 2019 in Selenium by Abha
• 28,140 points
17,275 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP