RPA Framework

31.2.0 · active · verified Mon Apr 13

RPA Framework (rpaframework) is an open-source collection of Python libraries and tools designed for Robotic Process Automation (RPA). It supports both direct Python scripting and integration with Robot Framework. As of version 31.2.0, it offers extensive capabilities for web, desktop, and API automation. The library maintains a rapid release cadence, with frequent updates and bug fixes.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates a basic web automation task using `RPA.Browser.Selenium`. It opens a browser, navigates to Robocorp's website, verifies the page title, and then closes the browser. Note that this requires a compatible browser driver (e.g., Chrome or Edge driver) to be installed and accessible in your system's PATH, or managed by a tool like Robocorp's `rcc`.

from RPA.Browser.Selenium import Selenium
import logging

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

def minimal_web_automation():
    browser = None # Initialize browser to None for finally block
    try:
        browser = Selenium()
        logger.info("Opening browser...")
        # Ensure a suitable web driver (e.g., chromedriver) is in your PATH
        # or managed by rcc for this to work.
        browser.open_available_browser("https://www.robocorp.com")
        logger.info("Browser opened to Robocorp.com")
        browser.maximize_browser_window()
        title = browser.get_title()
        logger.info(f"Page title: {title}")
        assert "Robocorp" in title, "Title does not contain 'Robocorp'"
        logger.info("Successfully verified page title.")
    except Exception as e:
        logger.error(f"An error occurred: {e}")
    finally:
        if browser:
            logger.info("Closing browser...")
            browser.close_browser()
            logger.info("Browser closed.")

if __name__ == "__main__":
    minimal_web_automation()

view raw JSON →