Skip to main content

Python Package CI

"Buy Me A Coffee"

SeleniumLibrary Grid Downloader Plugin

Robot Framework Python License

GridDownloader is a SeleniumLibrary plugin for Robot Framework that retrieves files downloaded by a remote browser running on Selenium Grid.

It uses Selenium Grid managed downloads and Selenium Python's command executor, so Grid URL paths, authentication, proxies, TLS, and session handling stay aligned with Selenium itself.

Requirements

  • Python 3.11 or newer
  • Robot Framework 7.4.2 or newer
  • SeleniumLibrary 6.9.0 or newer
  • Selenium 4.29.0 through 4.44.x, matching the SeleniumLibrary 6.9.0 supported range
  • Selenium Grid 4 with managed downloads enabled on the Node:
java -jar selenium-server-<version>.jar node --enable-managed-downloads true

Selenium Grid managed downloads currently support Chrome, Edge, and Firefox. Files must be listed or downloaded while the browser session is still active because Grid cleans the session download directory when the session ends.

Install

pip install -U robotframework-selenium-grid-downloader

Keywords Documentation

Keywords documentation can be found here.

Example Usage

*** Settings ***
Library   SeleniumLibrary  plugins=GridDownloader
Test Teardown  Close All Browsers

*** Variables ***
${BROWSER}           chrome
${URL}               https://www.example.com
${OPTIONS}           platform_name="windows"
${GRID_URL}          http://grid.example.com:4444/wd/hub
${DOWNLOAD_LINK}     xpath=//a[@id='download']
${FILENAME}          file1.txt
${EXPECTED_CONTENT}  Hello World

*** Test Cases ***
Download File And Check Content
    Open Browser    ${URL}    ${BROWSER}    remote_url=${GRID_URL}    options=${OPTIONS}
    Click Element   ${DOWNLOAD_LINK}
    Wait Until File Is Available To Download    ${FILENAME}    timeout=30 seconds    wait_step=1 second
    @{downloaded_files}=    Get List Of Downloaded Files
    Should Contain    ${downloaded_files}    ${FILENAME}
    ${content}=    Download File From Grid    ${FILENAME}
    ${content_text}=    Evaluate    $content.decode("utf-8")
    Should Be Equal As Strings    ${content_text}    ${EXPECTED_CONTENT}
    Delete Downloaded Files From Grid

Capability Activation

By default, the plugin wraps SeleniumLibrary's Open Browser keyword and adds se:downloadsEnabled=True to Selenium options.

Automatic activation can be disabled:

Library   SeleniumLibrary  plugins=GridDownloader;activate_capability=No

When activation is disabled, set the capability yourself:

${OPTIONS}    enable_downloads=True
Open Browser    ${URL}    chrome    remote_url=${GRID_URL}    options=${OPTIONS}

Keywords

  • Get List Of Downloaded Files returns file names available for the active Grid session.
  • Wait Until File Is Available To Download polls the Grid session until the named file is available.
  • Download File From Grid downloads the file to Robot Framework's output directory by default and returns its bytes.
  • Delete Downloaded Files From Grid removes downloadable files for the active Grid session.

Metadata

Release files for robotframework-selenium-grid-downloader 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-selenium-grid-downloader 1.2.0
File Size Uploaded
robotframework_selenium_grid_downloader-1.2.0.tar.gz 110.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-selenium-grid-downloader 1.2.0
File Interpreter ABI Platform
robotframework_selenium_grid_downloader-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 123.3 kB

Release files / robotframework_selenium_grid_downloader-1.2.0.tar.gz

Download URL robotframework_selenium_grid_downloader-1.2.0.tar.gz
Size 110.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4009ff4e480108651bcdadbd4a6d5a28d01fe36e3570f9de4a2ac61a35ae38a6
BLAKE2b-256 checksum
How to use checksums
7be60556fe6b717a95ec4f2ecaa78327bde96a461119f6c812546c3903c0914f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / robotframework_selenium_grid_downloader-1.2.0-py3-none-any.whl

Download URL robotframework_selenium_grid_downloader-1.2.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39e9a785a977278c0ef29e223f45473bc194da4343f24877713fb9794c8d3a4b
BLAKE2b-256 checksum
How to use checksums
79f67b18c4dad399de5f58ad174815bd2f7a9ac0447f77f06ad6dff9351a9444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page