seleniumabsxy


Nameseleniumabsxy JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/seleniumabsxy
SummaryClicks on Selenium webelements at a certain screen position (x,y)
upload_time2023-06-19 02:18:07
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords selenium coordinates
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# 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.


```python
# 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)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/seleniumabsxy",
    "name": "seleniumabsxy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "selenium,coordinates",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a4/27/27582e8312c09fce91016ed242e4d2e93330e05aa2f3bc9eaee93e675e29/seleniumabsxy-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# Clicks on Selenium webelements at a certain screen position (x,y)\r\n\r\n## pip install seleniumabsxy\r\n\r\n### Tested against Windows 10 / Python 3.10 / Anaconda \r\n\r\n\r\nThis module can benefit individuals or developers who need to automate browser interactions, \r\nsuch as clicking on specific elements or locations within a web page. By providing the ability to click on coordinates, \r\nit allows for precise interactions with web elements that may not be easily accessible through other means.\r\n\r\n## Advantages of this module include:\r\n\r\n### Automation: \r\n\r\nIt enables automated clicking on specific coordinates within a browser window, which can save time and effort when performing repetitive tasks.\r\n\r\n### Precise Interactions: \r\n\r\nBy specifying exact coordinates, it allows for precise targeting of specific elements or locations on a web page.\r\nIntegration with Chrome: The module integrates with undetected_chromedriver, \r\nwhich provides an undetectable Chrome browser instance, allowing for seamless automation without detection by websites.\r\n\r\n\r\n### Hotkey Support: \r\n\r\nThe 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.\r\n\r\n\r\n```python\r\n# This code imports necessary libraries and functions, sets a hotkey combination to show\r\n# the cursor coordinates, creates a Chrome browser instance with specific options, assigns the\r\n# driver to the coordsclicker module, waits for 5 seconds, opens a webpage (https://python.org), \r\n# maximizes the browser window, and provides instructions on how to use the click_on_coords function \r\n# to click on an object by specifying its coordinates.\r\n\r\n# The Browser must either be maximized or the x-coordinate has to be 0 if not maximized\r\n\r\nfrom time import sleep\r\nimport undetected_chromedriver as uc\r\n\r\nfrom seleniumabsxy import set_show_hotkey_coords, click_on_coords, coordsclicker\r\n\r\nif __name__ == \"__main__\":\r\n    set_show_hotkey_coords(hotkey='ctrl+alt+k')\r\n    chrome_opt = uc.ChromeOptions()\r\n    chrome_opt.add_argument(\"--incognito\")\r\n    driver = uc.Chrome(\r\n        options=chrome_opt,\r\n    ) # works also with Selenium, but Chrome only \r\n    coordsclicker.driver = driver # important!!\r\n    sleep(5)\r\n    driver.get(r\"https://python.org\")\r\n    driver.fullscreen_window()\r\n    # Go to the object you want to click on, press 'ctrl+alt+k', and call click_on_coords(x,y)\r\n    # The click_on_coords function retrieves a clickable element at the specified coordinates and clicks on it.\r\n\t\r\n\t# After pressing 'ctrl+alt+k', you will see something like this\r\n    # x=1277, y=459\r\n\r\n    # This is how you click\r\n    # click_on_coords(x=1277, y=459)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Clicks on Selenium webelements at a certain screen position (x,y)",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/seleniumabsxy"
    },
    "split_keywords": [
        "selenium",
        "coordinates"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe697359b458464b041f6744d3d7681c9a87223376e2f375d8abd04fbe66a0a3",
                "md5": "6e6904250facb5111b03aa245194697b",
                "sha256": "1960503d1d3ace3cd3a66fc94fdeab33708a9e7dc0efb587fee7fd84e8a9b870"
            },
            "downloads": -1,
            "filename": "seleniumabsxy-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6e6904250facb5111b03aa245194697b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7627,
            "upload_time": "2023-06-19T02:18:06",
            "upload_time_iso_8601": "2023-06-19T02:18:06.326766Z",
            "url": "https://files.pythonhosted.org/packages/fe/69/7359b458464b041f6744d3d7681c9a87223376e2f375d8abd04fbe66a0a3/seleniumabsxy-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a42727582e8312c09fce91016ed242e4d2e93330e05aa2f3bc9eaee93e675e29",
                "md5": "9e219ea2545624ea5fce8011517ca8ff",
                "sha256": "3357a639304a97f8cd0b37643cb3ce2ce1e32a5969bd4d3688991dbafe8799bb"
            },
            "downloads": -1,
            "filename": "seleniumabsxy-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "9e219ea2545624ea5fce8011517ca8ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5286,
            "upload_time": "2023-06-19T02:18:07",
            "upload_time_iso_8601": "2023-06-19T02:18:07.939859Z",
            "url": "https://files.pythonhosted.org/packages/a4/27/27582e8312c09fce91016ed242e4d2e93330e05aa2f3bc9eaee93e675e29/seleniumabsxy-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-19 02:18:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "seleniumabsxy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "seleniumabsxy"
}
        
Elapsed time: 0.09929s