Using Python-based SeleniumLibrary with the Robotframework Plugin

ExtraPathDirectories parameter can be used to add extra test libraries to your build.

By default, you should add them to ${project.basedir}/src/test/resources/robotframework/libraries.

Configuration and Installation

This is just and example how importing can be done, as there's also Java-based Selenium-library available that can be included just as Maven depednency

Download the tarball from the Selenium Library releases page, e.g. robotframework-seleniumlibrary-3.3.1.tar.gz

Extract the file and move the SeleniumLibrary directory from robotframework-seleniumLibrary/src to $project.basedir/src/test/resources/robotframework/libraries.

So your project will have a folder ${project.basedir}/src/test/resources/robotframework/libraries/SeleniumLibrary

Make same thing for external dependencies of the library. Robot Framework doesn't need to be imported, as it comes from dependencies.

Example

Now, you can import SeleniumLibrary and use its keywords in your tests.

Below you see a test case that uses the Open Browser keyword. The Selenium server is started during suite setup.

*** Settings ***
Library  SeleniumLibrary
Suite Set Up  Start Selenium Server
Suite Tear Down  Stop Selenium Server

*** Test Cases ***
My Test
   Open Browser  http://robotframework.org