We are looking at improving our keyword usage to cover situations where developer might be struggling to smoothly write task for a Robot. Describe the situation where your implementation speed slows due to the lack of easier syntax.
Comment HERE
RPA Framework is a collection of open-source libraries and tools for Robotic Process Automation (RPA), and it is designed to be used with both Robot Framework and Python. The goal is to offer well-documented and actively maintained core libraries for Software Robot Developers.
Learn more about RPA at Robocorp Documentation.
The project is:
From the above packages, rpaframework-core
and rpaframework-recognition
are
support packages, which alone do not contain any libraries.
The RPA Framework project currently includes the following libraries:
The x
in the PACKAGE column means that library is included in the rpaframework package and for example. x,pdf
means that RPA.PDF
library is provided in both the rpaframework and rpaframework-pdf packages.
LIBRARY NAME | DESCRIPTION | PACKAGE |
Archive | Archiving TAR and ZIP files | x |
Assistant | Display information to a user and request input. | assistant |
Browser.Selenium | Control browsers and automate the web | x |
Browser.Playwright | Newer way to control browsers | special (more below) |
Calendar | For date and time manipulations | x |
Cloud.AWS | Use Amazon AWS services | x,aws |
Cloud.Azure | Use Microsoft Azure services | x |
Cloud.Google | Use Google Cloud services | |
Crypto | Common hashing and encryption operations | x |
Database | Interact with databases | x |
Desktop | Cross-platform desktop automation | x |
Desktop.Clipboard | Interact with the system clipboard | x |
Desktop.OperatingSystem | Read OS information and manipulate processes | x |
DocumentAI | Intelligent Document Processing wrapper | x |
DocumentAI.Base64AI | Intelligent Document Processing service | x |
DocumentAI.Nanonets | Intelligent Document Processing service | x |
Email.Exchange | E-Mail operations (Exchange protocol) | x |
Email.ImapSmtp | E-Mail operations (IMAP & SMTP) | x |
Excel.Application | Control the Excel desktop application | x |
Excel.Files | Manipulate Excel files directly | x |
FileSystem | Read and manipulate files and paths | x |
FTP | Interact with FTP servers | x |
HTTP | Interact directly with web APIs | x |
Hubspot | Access HubSpot CRM data objects | hubspot |
Images | Manipulate images | x |
JavaAccessBridge | Control Java applications | x |
JSON | Manipulate JSON objects | x |
MFA | Authenticate using one-time passwords (OTP) & OAuth2 | x |
Notifier | Notify messages using different services | x |
OpenAI | Artificial Intelligence service | openai |
Outlook.Application | Control the Outlook desktop application | x |
Read and create PDF documents | x,pdf | |
Robocorp.Process | Use the Robocorp Process API | x |
Robocorp.WorkItems | Use the Robocorp Work Items API | x |
Robocorp.Vault | Use the Robocorp Secrets API | x |
Robocorp.Storage | Use the Robocorp Asset Storage API | x |
Salesforce | Salesforce operations | x |
SAP | Control SAP GUI desktop client | x |
Smartsheet | Access Smartsheet sheets | x |
Tables | Manipulate, sort, and filter tabular data | x |
Tasks | Control task execution | x |
Twitter API interface | x | |
Windows | Alternative library for Windows automation | x,windows |
Word.Application | Control the Word desktop application | x |
The RPA.Browser.Playwright at the moment requires special installation, because of the package size and the post install step it needs to be fully installed.
Minimum required conda.yaml to install Playwright:
channels:
- conda-forge
dependencies:
- python=3.9.16
- nodejs=16.14.2
- pip=22.1.2
- pip:
- robotframework-browser==17.2.0
- rpaframework==24.1.2
rccPostInstall:
- rfbrowser init
Learn about installing Python packages at Installing Python Packages.
Default installation method with Robocorp Developer Tools using conda.yaml:
channels:
- conda-forge
dependencies:
- python=3.9.16
- pip=22.1.2
- pip:
- rpaframework==24.1.2
To install all extra packages (including Playwright dependencies), you can use:
channels:
- conda-forge
dependencies:
- python=3.9.16
- tesseract=4.1.1
- nodejs=16.14.2
- pip=22.1.2
- pip:
- robotframework-browser==17.2.0
- rpaframework==24.1.2
- rpaframework-aws==5.2.8
- rpaframework-google==7.0.3
- rpaframework-recognition==5.1.2
rccPostInstall:
- rfbrowser init
Separate installation of AWS, PDF and Windows libraries without the main
rpaframework
:
channels:
- conda-forge
dependencies:
- python=3.9.16
- pip=22.1.2
- pip:
- rpaframework-aws==5.2.8 # included in the rpaframework as an extra
- rpaframework-pdf==7.1.5 # included in the rpaframework by default
- rpaframework-windows==7.3.2 # included in the rpaframework by default
Installation method with pip using Python venv:
python -m venv .venv
source .venv/bin/activate
pip install rpaframework
Note
Python 3.8 or higher is required
After installation the libraries can be directly imported inside Robot Framework:
*** Settings ***
Library RPA.Browser.Selenium
*** Tasks ***
Login as user
Open available browser https://example.com
Input text id:user-name ${USERNAME}
Input text id:password ${PASSWORD}
The libraries are also available inside Python:
from RPA.Browser.Selenium import Selenium
lib = Selenium()
lib.open_available_browser("https://example.com")
lib.input_text("id:user-name", username)
lib.input_text("id:password", password)
Found a bug? Missing a critical feature? Interested in contributing? Head over to the Contribution guide to see where to get started.
Repository development is Python based and requires at minimum
Python version 3.8+ installed on the development machine. The default Python version used in the
Robocorp Robot template is 3.9.16 so it is a good choice for the version to install. Not recommended
versions are 3.7.6 and 3.8.1, because they have issues with some of the dependencies related to rpaframework
.
At the time the newer Python versions starting from 3.11 are also not recommended, because some of
the dependencies might cause issues.
Repository development tooling is based on poetry and invoke. Poetry is the underlying tool used for compiling, building and running the package. Invoke is used for scripting purposes, for example for linting, testing and publishing tasks.
Before writing any code, please read and acknowledge our extensive Dev Guide.
First steps to start developing:
poetry config virtualenvs.path null
poetry config virtualenvs.in-project true
poetry config repositories.devpi "https://devpi.robocorp.cloud/ci/test"
git clone the repository
create a new Git branch or switch to correct branch or stay in master branch
poetry install
which install package with its dependencies into the .venv directory of the package, for example packages/main/.venv
if testing against Robocorp Robot which is using devdata/env.json
poetry build
and use resulting .whl file (in the dist/ directory) in the Robot conda.yaml
poetry build
and push resulting .whl file (in the dist/ directory) into a repository and use raw url
to include it in the Robot conda.yaml
poetry publish --ci
and point conda.yaml to use rpaframework version in devpipoetry run python -m robot <ROBOT_ARGS> <TARGET_ROBOT_FILE>
--report NONE --outputdir output --logtitle "Task log"
poetry run python <TARGET_PYTHON_FILE>
invoke lint
to make sure that code formatting is according to rpaframework repository guidelines.
It is possible and likely that Github action will fail the if developer has not linted the code changes. Code
formatting is based on black and flake8 and those are run with the invoke lint
.
the library documentation can be created in the repository root (so called "meta" package level). The documentation is
built by the docgen tools using the locally installed version of the project, local changes for the main package
will be reflected each time you generate the docs, but if you want to see local changes for optional packages, you must
utilize invoke install-local --package <package_name>
using the appropriate package name (e.g., rpaframework-aws
). This
will reinstall that package as a local editable version instead of from PyPI. Multiple such packages can be added by
repeating the use of the --package
option. In order to reset this, use invoke install --reset
.
poetry update
and/or invoke install-local --package <package name>
make docs
docs/build/html/index.html
with the browser to view the changes or execute make local
and navigate to
localhost:8000
to view docs as a live local webpage.# Before
[tool.poetry.dependencies]
python = "^3.8"
rpaframework = { path = "packages/main", extras = ["cv", "playwright", "aws"] }
rpaframework-google = "^4.0.0"
rpaframework-windows = "^4.0.0"
# After
[tool.poetry.dependencies]
python = "^3.8"
rpaframework = { path = "packages/main", extras = ["cv", "playwright"] }
rpaframework-aws = { path = "packages/aws" }
rpaframework-google = "^4.0.0"
rpaframework-windows = "^4.0.0"
invoke test
(this will run both Python unittests and robotframework tests defined in the packages tests/ directory)
poetry run pytest path/to/test.py::test_function
inv testrobot -r <robot_name> -t <task_name>
git commit changes
git push changes to remote
create pull request from the branch describing changes included in the description
update docs/source/releasenotes.rst with changes (commit and push)
Packaging and publishing are done after changes have been merged into master branch. All the following steps should be done within master branch.
invoke lint
and invoke test
poetry update
invoke publish
after Github action on master branch is all greenSome recommended tools for development
Visual Studio Code as a code editor with following extensions:
- Robocorp Code
- Robot Framework Language Server
- GitLens
- Python extension
GitHub Desktop will make version management less prone to errors
This project is open-source and licensed under the terms of the Apache License 2.0.