Skip to main content

Call RobotFramework keywords from Python

Project description

robotframework-libraryproxy

Simple library for calling RobotFramework keywords from Python, with the possibility to log them in the output.

Example Python library:

from Browser import Browser
from robotlibraryproxy import library_proxy

def do_something_in_browser(self):
    with library_proxy(Browser) as browser:
        browser.new_browser(headless=False)
        browser.new_page("https://example.com")
        browser.click("text=More Information...")

or another way as python descriptor:

from Browser import Browser
from robotlibraryproxy import library_proxy


class Dummy:

    browser: Browser = library_proxy()

    def do_something_in_browser(self):
        self.browser.new_browser(headless=False)
        self.browser.new_page("https://example.com")
        self.browser.click("text=More Information...")

Example Test case that uses this library:

*** Settings ***

Library    Dummy.py

# Library    Browser

*** Test Cases ***

a simple test
    Do Something In Browser

An excerpt from the Robot log:

Example from robot log

more comming soon...

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

robotframework_libraryproxy-0.2.0.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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