Skip to main content

Robocorp Windows Automation (API to automate Windows)

Project description

robocorp-windows

The robocop-windows package brings a library that can be used for Windows desktop automation.

The basic idea of the library is to enable windows and controls to be found by leveraging "locators" (strings that identify how to reach some window or control), then interacting with such elements.

There are three fundamental abstractions in the library:

  • Desktop: enables finding WindowElements and interacting directly with the desktop, like opening or closing apps. These actions aren't tied to a specific Window or Control.
  • WindowElement: enables finding direct ControlElements and interacting with a specific Window.
  • ControlElement: enables finding child ControlElements and interacting with a specific Control.

Note: The library itself always creates these classes which are not expected to be subclassed or instanced directly.

Usage

robocorp-windows

👉 Check that you have added the dependency in your configuration; this library is not part of the robocorp bundle.

  • conda.yaml for automation Task Packages
  • package.yaml for automation Action Packages
  • requirements.txt, pyproject.toml, setup.py|cfg etc. for the rest

The library concepts revolve around the idea that the window of interest will be initially found using find_window and then, with that window reference, other controls can be queried and interacted with (for clicking, entering text etc.).

Below is an example using the Windows' Calculator app:

from robocorp import windows

# Get the Calculator window.
calc = windows.find_window("name:Calculator")

# Press button "0" (the locator may vary based on the Windows version).
button0 = calc.find("(name:0 or name:num0Button) and type:Button")
button0.click()

# Clear the Calculator (the locator may vary based on the Windows version).
calc.click("id:clearEntryButton or name:Clear")

# Send the keys directly to the Calculator by typing them from the keyboard.
calc.send_keys(keys="96+4=")

Guides

API Reference

Explore our API for extensive documentation.

Changelog

A list of releases and corresponding changes can be found in the changelog.

Project details


Download files

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

Source Distribution

robocorp_windows-1.0.2.tar.gz (202.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robocorp_windows-1.0.2-py3-none-any.whl (211.3 kB view details)

Uploaded Python 3

File details

Details for the file robocorp_windows-1.0.2.tar.gz.

File metadata

  • Download URL: robocorp_windows-1.0.2.tar.gz
  • Upload date:
  • Size: 202.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.9.13 Windows/10

File hashes

Hashes for robocorp_windows-1.0.2.tar.gz
Algorithm Hash digest
SHA256 45d387878bc29bdbfbfe932fb079bf1ed4fcacb8330d3d33d0d74c221a86cc45
MD5 1f33c43eb70842faf4bc28d6de9ad03d
BLAKE2b-256 f028b701e33b3708dfffe3da27b5d9cd5f043f3f2ac091ff4bdd95038de612c9

See more details on using hashes here.

File details

Details for the file robocorp_windows-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: robocorp_windows-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 211.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.9.13 Windows/10

File hashes

Hashes for robocorp_windows-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7cee587a3e35403d45682549ef2bf4485d9c71c32e6a5c650d9c1ffde7e0cddb
MD5 9720b4801b08a25d56d6ae7158f0c554
BLAKE2b-256 c00693d3a750cee5310a1dbc0119bc4ab3179ee04d23501451c54f86c92ce39d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page