RPA.BrowserView on GitHub
Browser is a library for interfacing with web browsers like Chrome, Firefox, Safari, Edge, and Opera. The library extends SeleniumLibrary.
Headless mode can be set by environment variable
setting is used with
Open Available Browser keyword.
Supports now also usage of SeleniumTestability plugin, which can be taken into use by iniatializing library with:
*** Settings *** Library RPA.Browser use_testability
The library provides a special keyword
Open Available Browser.
The keyword opens the first available webdriver in the running environment. For example, for Windows, the browser list in preference order is Chrome, Firefox, Edge, IE, and Opera. The opening is tried in three different ways for each webdriver type.
- Try to open the webdriver “normally”
- Download the driver if the browser has driver available and try to open the webdriver again
- Try to open the webdriver in “headless” mode if that was not the original intention
- Move to the next webdriver type if steps 1-3 fail
*** Settings *** Library RPA.Browser *** Tasks *** Opening page Open Available Browser https://www.google.com
from RPA.Browser import Browser br = Browser() br.open_available_browser("https://www.google.com", headless=True) br.input_text("//input[@name='q']", "robocorp") br.screenshot(page=True, locator="//input[@name='q']")
- Robot Framework API
- Python module API