Skip to main content

Move mouse cursor to element in browser

Project description

SeleniumMoveCursor

Moving cursor to element in browser run by selenium webdriver. Works for chrome and firefox browser maximized or minimized. Method to use is move_to_element.

Preconditions

  • Web element is visible on browser (scroll should be done before calling method move_to_element)

Parameters for method move_to_element

  • driver - WebDriver

  • element - WebElement

  • display_scaling - Display scaling (100, 125, 150 or 175 %) need to be given when calling method move_to_element. Default is 100. This info can be found in display settings.

  • chrome_info_bar_shown - Is shown chrome infobar with text: "Chrome is being controlled by automated test software"

How to use method for moving cursor to web element (move_to_element):

from selenium import webdriver from selenium_move_cursor.MouseActions import move_to_element_chrome

driver = webdriver.Chrome(chrome_options=chrome_options)

driver.maximize_window()

driver.get("https://www.google.com/") element = driver.find_elements_by_css_selector("input[class='gNO89b']")[1]

move_to_element_chrome(driver, element, display_scaling=100, chrome_info_bar_shown=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for selenium-move-cursor, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size selenium_move_cursor-0.0.8-py3-none-any.whl (4.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size selenium-move-cursor-0.0.8.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page