SeleniumLibrary is a web testing library for Robot Framework. SeleniumLibrary uses the Selenium WebDriver modules internally to control a web browser.
To install the selenium library into the robot framework Navigate to the link SeleniumLibrary. The GitHub page will open, click on the
clone/download and then select the download the Zip.
Once you click on
Download Zip and select the path to save the selenium master file
Once the file completes it's downloading, go to the file location and extract the file from the Zip format. Open the extracted file, and you can see the selenium setup file.
Open the Python file location and then save the extracted selenium library-master file inside the
python 37 folders.
Now, right-click on the
link path and copy the address of the setup file
Now, open the command prompt and directed to the setup folder and then, pass the command as
Now you have successfully installed selenium library
Now open the Ride editor through command prompt and open the project and click on the Library which is present at the right corner.
The library page will open, now add the name of the library as
SeleniumLibrary and click on
If the library is installed successfully, it will be displayed on the page as shown below
While importing the library, if you made any spelling mistake also, the file will be displayed in red color only.
We have successfully installed Selenium library, by using the selenium library let us create a web-based test case:
The steps to create a web-based test case is as follow :
First, open the Ride editor, and then right-click on the project and select the New Suite
Create a new test suite as WebAutomation and click on ok
Right-click on Web Automation and create a new test case as OpenBrowser and click on the Ok button.
Open the WebAutomation and import the selenium library in that
We have successfully imported Selenium Library into Web Automation. Open test case and check for the keyword open browser, it will show you the necessary things to create an open browser such as URL and then the Browser.
If you scroll down, the keyword show you what kind of browsers it will support for
Now, pass the arguments as
www.google.com and the browser like
Select the test case and click on the Run button and then click on the Start, we will get an error while executing the test case.
Open the log report and then open the test page, you will find the error message as
Message: WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Copy the link address and paste in the browser, the chrome driver page will open
Click on the downloads, and there you will get all the versions of chrome, before downloading, first check which version of chrome you are using.
For that right-click on the three dots(:) on the right upper corner of the windows and then select the help and then click on about google chrome
Currently, I am using 77.0 version
Go back to the chrome driver download page, and it says that if you are using the google 77 version then download the ChromeDriver 77.0.3865.40
Click on the link and download, and the index page will open, select the win32
Once it completes downloading, extract the file from the zip format and then copy and paste it inside the script file of the python37
Go back to the test case and Run the Web Automation test case; it will successfully open the web browser.
The Next thing is, we have to close the browser, for that, open the test script and select the keyword as the close browser.
Run the test case again.