robotframework-seleniumlibrary 6.7.1
pip install robotframework-seleniumlibrary
Released:
Web testing library for Robot Framework
Navigation
Verified details
These details have beenverified by PyPIMaintainers
Unverified details
These details havenot been verified by PyPIProject links
Meta
- License: Apache Software License (Apache License 2.0)
- Author:Ed Manlove, Yuri Verweij
- Tags robotframework, testing, testautomation, selenium, webdriver, web
- Requires: Python <3.14, >=3.8
Classifiers
- Development Status
- Framework
- License
- Operating System
- Programming Language
- Topic
Project description
Introduction
SeleniumLibrary is a web testing library forRobot Framework thatutilizes theSelenium tool internally. The project is hosted onGitHuband downloads can be found fromPyPI.
SeleniumLibrary currently works with Selenium 4. It supports Python 3.8 through 3.13.In addition to the normalPython interpreter, it works alsowithPyPy.
SeleniumLibrary is based on the “old SeleniumLibrary” that was forked toSelenium2Library and then later renamed back to SeleniumLibrary.See theVERSIONS.rst for more information about different versions and theoverall project history.
Keyword Documentation
Seekeyword documentation for available keywords and more informationabout the library in general.
Installation
The recommended installation method is usingpip:
pip install --upgrade robotframework-seleniumlibrary
Running this command installs also the latest Selenium and Robot Frameworkversions, but you still need to installbrowser drivers separately.The--upgrade option can be omitted when installing the library for thefirst time.
It is possible to install directly from theGitHub repository. To installlatest source from the master branch, use this command:
pip install git+https://github.com/robotframework/SeleniumLibrary.git
Please note that installation will take some time, becausepip willclone theSeleniumLibrary project to a temporary directory and thenperform the installation.
SeeRobot Framework installation instructions for detailed informationabout installing Python and Robot Framework itself. For more details aboutusingpip seeits own documentation.
Browser drivers
After installing the library, you still need to install browser andoperating system specific browser drivers for all those browsers youwant to use in tests. These are the exact same drivers you need to use withSelenium also when not using SeleniumLibrary. More information aboutdrivers can be found fromSelenium documentation.
The general approach to install a browser driver is downloading a rightdriver, such aschromedriver for Chrome, and placing it intoa directory that is inPATH. Drivers for different browserscan be found via Selenium documentation or by using your favoritesearch engine with a search term likeselenium chrome browser driver.New browser driver versions are released to support features innew browsers, fix bug, or otherwise, and you need to keep an eye on themto know when to update drivers you use.
Alternatively, you can use a tool calledWebdriverManager which canfind the latest version or when required, any version of appropriatewebdrivers for you and then download and link/copy it into rightlocation. Tool can run on all major operating systems and supportsdownloading of Chrome, Firefox, Opera & Edge webdrivers.
Here’s an example:
pipinstallwebdrivermanagerwebdrivermanagerfirefoxchrome--linkpath/usr/local/bin
Usage
To use SeleniumLibrary in Robot Framework tests, the library needs tofirst be imported using theLibrary setting as any other library.The library accepts some import time arguments, which are documentedin thekeyword documentation along with all the keywords providedby the library.
When using Robot Framework, it is generally recommended to write aseasy-to-understand tests as possible. The keywords provided bySeleniumLibrary is pretty low level, though, and often requireimplementation-specific arguments like element locators to be passedas arguments. It is thus typically a good idea to write tests usingRobot Framework’s higher-level keywords that utilize SeleniumLibrarykeywords internally. This is illustrated by the following examplewhere SeleniumLibrary keywords likeInput Text are primarilyused by higher-level keywords likeInput Username.
*** Settings ***DocumentationSimple example using SeleniumLibrary.LibrarySeleniumLibrary*** Variables ***${LOGIN URL}http://localhost:7272${BROWSER}Chrome*** Test Cases ***Valid LoginOpen Browser To Login PageInput UsernamedemoInput PasswordmodeSubmit CredentialsWelcome Page Should Be Open [Teardown]Close Browser*** Keywords ***Open Browser To Login PageOpen Browser ${LOGIN URL} ${BROWSER}Title Should BeLogin PageInput Username [Arguments] ${username}Input Textusername_field ${username}Input Password [Arguments] ${password}Input Textpassword_field ${password}Submit CredentialsClick Buttonlogin_buttonWelcome Page Should Be OpenTitle Should BeWelcome Page
The above example is a slightly modified version of an example in ademo project that illustrates using Robot Framework and SeleniumLibrary.See the demo for more examples that you can also execute on your ownmachine. For more information about Robot Framework test data syntax ingeneral see theRobot Framework User Guide.
Extending SeleniumLibrary
Before creating your own library which extends theSeleniumLibrary, please consider wouldthe extension be also useful also for general usage. If it could be useful also for generalusage, please create a new issue describing the enhancement request and even better if theissue is backed up by a pull request.
If the enhancement is not generally useful, example solution is domain specific, then theSeleniumLibrary offers public APIs which can be used to build its own plugins and libraries.Plugin API allows us to add new keywords, modify existing keywords and modify the internalfunctionality of the library. Also new libraries can be built on top of theSeleniumLibrary. Please seeextending documentation for more details about theavailable methods and for examples how the library can be extended.
Community
If the provided documentation is not enough, there are various community channelsavailable:
#seleniumlibrary and#seleniumlibrary-dev channels inRobot FrameworkSlack community
Robot Framework forum has channel for SeleniumLibrary.
SeleniumLibraryissue tracker for bug reports and concrete enhancementrequests
Other community channels including paid support
Project details
Verified details
These details have beenverified by PyPIMaintainers
Unverified details
These details havenot been verified by PyPIProject links
Meta
- License: Apache Software License (Apache License 2.0)
- Author:Ed Manlove, Yuri Verweij
- Tags robotframework, testing, testautomation, selenium, webdriver, web
- Requires: Python <3.14, >=3.8
Classifiers
- Development Status
- Framework
- License
- Operating System
- Programming Language
- Topic
Release historyRelease notifications |RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more aboutinstalling packages.
Source Distribution
Built Distribution
UploadedPython 2
Python 3
File details
Details for the filerobotframework_seleniumlibrary-6.7.1.tar.gz
.
File metadata
- Download URL:robotframework_seleniumlibrary-6.7.1.tar.gz
- Upload date:
- Size: 171.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f3aaf7d683b3d619de0ce4849ff9ac33117dd8630f4d7528b4bf0a6d06d6616 | |
MD5 | 3c7263c28f88fa17eb8a1cf6ad5c33c3 | |
BLAKE2b-256 | e4b9bca261b0e6cff5dee3b62a0d0516732e43164285212b189679e68effec32 |
File details
Details for the filerobotframework_seleniumlibrary-6.7.1-py2.py3-none-any.whl
.
File metadata
- Download URL:robotframework_seleniumlibrary-6.7.1-py2.py3-none-any.whl
- Upload date:
- Size: 104.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88f02ec8e8a3be8bf415386bb248bbe6ca547e99a05f35d7e7b4026f8297439f | |
MD5 | b300b2f5fd7a057a0fd4aaf7c9db9bc5 | |
BLAKE2b-256 | 09267425fa53b04c3679cd693fb9a1dde393b13685a5cc3925fa158bcebb3bf8 |