Skip to main content

Clicks on Selenium webelements at a certain screen position (x,y)

pip install seleniumabsxy

Tested against Windows 10 / Python 3.10 / Anaconda

This module can benefit individuals or developers who need to automate browser interactions, such as clicking on specific elements or locations within a web page. By providing the ability to click on coordinates, it allows for precise interactions with web elements that may not be easily accessible through other means.

Advantages of this module include:

Automation:

It enables automated clicking on specific coordinates within a browser window, which can save time and effort when performing repetitive tasks.

Precise Interactions:

By specifying exact coordinates, it allows for precise targeting of specific elements or locations on a web page. Integration with Chrome: The module integrates with undetected_chromedriver, which provides an undetectable Chrome browser instance, allowing for seamless automation without detection by websites.

Hotkey Support:

The module offers the ability to set a hotkey combination to print the current cursor coordinates, which can be useful for debugging or identifying target locations.

# This code imports necessary libraries and functions, sets a hotkey combination to show
# the cursor coordinates, creates a Chrome browser instance with specific options, assigns the
# driver to the coordsclicker module, waits for 5 seconds, opens a webpage (https://python.org), 
# maximizes the browser window, and provides instructions on how to use the click_on_coords function 
# to click on an object by specifying its coordinates.

# The Browser must either be maximized or the x-coordinate has to be 0 if not maximized

from time import sleep
import undetected_chromedriver as uc

from seleniumabsxy import set_show_hotkey_coords, click_on_coords, coordsclicker

if __name__ == "__main__":
    set_show_hotkey_coords(hotkey='ctrl+alt+k')
    chrome_opt = uc.ChromeOptions()
    chrome_opt.add_argument("--incognito")
    driver = uc.Chrome(
        options=chrome_opt,
    ) # works also with Selenium, but Chrome only 
    coordsclicker.driver = driver # important!!
    sleep(5)
    driver.get(r"https://python.org")
    driver.fullscreen_window()
    # Go to the object you want to click on, press 'ctrl+alt+k', and call click_on_coords(x,y)
    # The click_on_coords function retrieves a clickable element at the specified coordinates and clicks on it.
	
	# After pressing 'ctrl+alt+k', you will see something like this
    # x=1277, y=459

    # This is how you click
    # click_on_coords(x=1277, y=459)

Metadata

Release files for seleniumabsxy 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seleniumabsxy 0.10
File Size Uploaded Provenance Actions
seleniumabsxy-0.10.tar.gz 5.3 kB Without provenance Details for seleniumabsxy-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for seleniumabsxy 0.10
File Interpreter ABI Platform Actions
seleniumabsxy-0.10-py3-none-any.whl Python 3 none any Details for seleniumabsxy-0.10-py3-none-any.whl

Total release size: 12.9 kB

Release files / seleniumabsxy-0.10.tar.gz

Download URL seleniumabsxy-0.10.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3357a639304a97f8cd0b37643cb3ce2ce1e32a5969bd4d3688991dbafe8799bb
BLAKE2b-256 checksum
How to use checksums
a42727582e8312c09fce91016ed242e4d2e93330e05aa2f3bc9eaee93e675e29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / seleniumabsxy-0.10-py3-none-any.whl

Download URL seleniumabsxy-0.10-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1960503d1d3ace3cd3a66fc94fdeab33708a9e7dc0efb587fee7fd84e8a9b870
BLAKE2b-256 checksum
How to use checksums
fe697359b458464b041f6744d3d7681c9a87223376e2f375d8abd04fbe66a0a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Security for seleniumabsxy 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page