SeleniumLibrary

6.8.0 · active · verified Sat Apr 11

SeleniumLibrary is a web testing library for Robot Framework, leveraging the Selenium WebDriver internally. It supports robust browser automation for web application testing. The current version, 6.8.0, supports Python 3.8 through 3.14, various Selenium 4.x versions, and Robot Framework 6.1.1 through 7.3.2. Releases are frequent, typically adapting to new Python, Selenium, and Robot Framework versions.

Warnings

Install

Imports

Quickstart

This Robot Framework example demonstrates a basic login test using SeleniumLibrary. It opens a Chrome browser, navigates to a login page, inputs text into username and password fields, clicks the login button, asserts a successful login message, and then closes the browser. Replace `${USERNAME_HERE}` and `${PASSWORD_HERE}` with actual credentials or variables.

*** Settings ***
Library    SeleniumLibrary

*** Test Cases ***
Example Login Test
    Open Browser    https://the-internet.herokuapp.com/login    browser=chrome
    Input Text    id=username    ${USERNAME_HERE}
    Input Text    id=password    ${PASSWORD_HERE}
    Click Button    css:button[type='submit']
    Element Should Contain    id=flash    You logged into a secure area!
    Close Browser

view raw JSON →