Skip to content

Latest commit

 

History

History
439 lines (383 loc) · 18.9 KB

SeleniumLibrary-4.0.0rc1.rst

File metadata and controls

439 lines (383 loc) · 18.9 KB

SeleniumLibrary 4.0.0rc1

SeleniumLibrary is a web testing library for Robot Framework that utilizes the Selenium tool internally. SeleniumLibrary 4.0.0rc1 is a new release with plugin API, support for Selenium EventFiringWebdriver and extending Open Browser keyword to support Selenium Options. There are also other enhancements and bug fixes in this release.

All issues targeted for SeleniumLibrary v4.0.0 can be found from the issue tracker.

If you have pip installed, just run

pip install --pre --upgrade robotframework-seleniumlibrary

to install the latest available release or use

pip install robotframework-seleniumlibrary==4.0.0rc1

to install exactly this version. Alternatively you can download the source distribution from PyPI and install it manually.

SeleniumLibrary 4.0.0rc1 was released on Sunday September 8, 2019. SeleniumLibrary supports Python 2.7 and 3.4+, Selenium 3.8.2 and Robot Framework 3.0.4 and 3.1.2.

Most important enhancements

SeleniumLibrary by creating plugin API. (#1292, alpha 1)

SeleniumLibrary 4.0 introduces a plugin API, which allows adding or modifying keywords directly in to the SeleniumLibrary. It also offers more wider access to the SeleniumLibrary internal methods.

More details can be found from the plugin API documentation.

Selenium EventFiringWebdriver (#1303, alpha 1)

SeleniumLibrary offers support for Selenium EventFiringWebdriver allowing users to import the EventFiringWebdriver class in to the SeleniumLibrary. More details can be found from the Selenium and SeleniumLibrary EventFiringWebdriver documentation

Open Browser keyword could take in Selenium browser specific options (#1331, alpha 2)

Open Browser keyword provides now native way to define browser specific Selenium options. This enhancement brings Open Browser keyword closer to what Create WebDriver keyword can do, but with cleaner API and by using single argument. Refer to the Selenium documentation which browser support Selenium options.

Enhance Open Browser keywords to support Selenium service_log_path argument (#1333, alpha 2)

In the past browser driver where not logged, expect for Firefox, to a file. Now the it is possible to define file where browser driver logs are created. This enhancement and the #1331 aims to replace Create WebDriver keyword.

Plugins should be last thing loaded in the SeleniumLibrary __init__ (#1424, beta 1)

The order when plugins and event firing WebDriver are discovered when SeleniumLibrary is changed. Now the discover of the plugin is done last and plugin has a possibility to load the event firing WebDriver inside of the plugin.

Add better support for plugin to add event firing WebDriver (#1425, beta 1)

A convince attribute is added for plugins, to easier add the event firing WebDriver in the library. Now it is possible to do this:

::

class MyPlugin(LibraryComponent):

def __init__(self, ctx):

LibraryComponent.__init__(self, ctx) self.event_firing_webdriver = WhatEverYouWant

Change Open Browser keyword to register driver before selenium get`is called (#1426`_, beta 1)

The Open Browser keyword did not register driver, before keyword called Selenium get API. This caused that event firing WebDriver was called before the driver was registered in the SeleniumLibrary cache. In some cases it caused problems to build proper support for plugins. This is now fixed and driver is registed before event firing WebDriver API is triggered.

Add better documentation support for plugins (#1430, rc 1)

To ease plugin documentation creation, now intro documentation, form plugin class, is added to the end of the SeleniumLibrary keywords documentation. This eases plugin documentation.

Event firing webdriver does not work with all Selenium action chains (#1435, rc 1)

Because of a bug in Selenium 3, Event firing WebDriver does not work with all Selenium

action chains. This is already fixed in Selenium 4, but as a workaround, use normal WebElement for Selenium Actions chains as a backup method.

Backwards incompatible changes

When Selenium Grid is used the Input Text and Input Password keywords should not do file upload if input string poinst to a file (#1404, beta 1)

In the previous releases it was possible to also use Input text or Input Password keywords to upload file, when using Selenium Grid. But is the string accidentally points to a file, when using Selenium grid, it will lead to hard to solve issues, because Selenium will transfer the file to the grid node and perform the file upload. This is now solved allowing Selenium to perform file upload, when using grid, only when using Choose File keyword.

It should be possible to configure Open Browser keyword to not always open a new browser. (#1319, alpha 2)

In the past Open Browser keyword did always open a new browser. With this enhancement new browser only opened if aliases are different for each Open Browser keyword.

Choose File keyword should not fail if file does not exist. (#1402, alpha 2)

In the past Choose File keyword only accepted strings which point to a file in the file system. Now this is changed and SeleniumLibrary does not anymore perform checks does the file exist, instead it is leaved for the underlying Selenium to device is the input string a file, folder or something which is not acceptable.

Remove deprecated attributes of unofficial public API (#1346, alpha 1)

The Selenium2Library 1.8 and older did not have public API, but it did have some methods which could be considered as part of a unofficial API. The SeleniumLibrary 3.0 created new public API and in the same time tried to keep as much as possible of the unofficial API in place. In same time with 3.0 release the old API was deprecated. The SeleniumLibrary 4.0 removes the unofficial and deprecated API.

Drop Robot Framework 2.9 support in SeleniumLibrary. (#1304, alpha 1)

SeleniumLibrary does not anymore support Robot Framework 2.9 or older releases. Users are encouraged to migrate Robot Framework 3.0 or 3.1.

Raise minimum supported Selenium version to 3.8.1 (#1305, alpha 1)

Minimum supported Selenium version has been raised to 3.8.1.

Remove keywords which where officially deprecated in previos releases. (#1274, alpha 1)

SeleniumLibrary has removed keyword which where loudly deprecated in the previous releases. User are encouraged to use the new keywords.

Update SeleniumLibrary is_truthy and is_falsy to follow Robot Framework 3.1 (#1308, alpha 1)

In previous SeleniumLibrary releases, string 0 was considered as true when evaluating boolean type. This is now changed and string 0 is considered as false.

Deprecated features

Deprecate loudly all silently deprecated keywords (#1273, alpha 1)

All keywords which where silently deprecated in the previous release, will now cause a deprecated warning.

Acknowledgements

Also there has been many contributions from the community. Special thanks to all that provided an contribution to the project. Here is a list of contributions which have made pull request in to this release.

I would like to remind that providing code or updating documentation is not the only way to contribute. There has been lot of issues raised in the project issue tracker and feedback has been provided in the user group and in slack. I am grateful from all the feedback.

In previous releases, the different window keywords did work only with the context of a single browser/WebDriver. Now it is possible to change WebDriver with the window keywords and locate the desired window. Many thanks Snooz82 for making the enhancement.

Wait For Location To Contain (#1108, alpha 1)

Many thanks to acaovilla who provided Wait Until Location Contains keyword in the RoboCon sprints.

Add Wait Until Location Is keyword (#1297, alpha 1)

Many thanks to acaovilla who provided Wait Until Location Is keyword. Sometime after the RoboCon.

Allow setting and getting window.innerWidth and window.innerHeight CSS properties (#1363, alpha 1)

Many thanks to ciccioman3, who enhanced the Set Window Size and Get Window Size keywords to support window.innerWidth and window.innerHeight css attributes.

Update readme to mention https://github.com/Omenia/webdrivermanager (#1301, alpha 1)

Many thanks to rasjani, who updated documentation to mention scripted browser driver installation.

Enhance EXTENDING_SELENIUMLIBRARY.rst readability. (#1372, alpha 2)

many thanks to humbienri who enhanced the EXTENDING_SELENIUMLIBRARY.rst documentation.

Full list of fixes and enhancements

ID Type Priority Summary Added
#1292 enhancement critical Allow extending SeleniumLibrary by creating plugin API. alpha 1
#1303 enhancement critical Add support event_firing_webdriver alpha 1
#1304 enhancement critical Drop Robot Framework 2.9 support in SeleniumLibrary. alpha 1
#1305 enhancement critical Raise minimum supported Selenium version to 3.8.1 alpha 1
#1419 bug high __init__() got an unexpected keyword argument service_log_path beta 1
#1435 bug high Event firing webdriver does not work with all Selenium action chains rc 1
#1331 enhancement high Open Browser keyword could take in Selenium browser specific options alpha 2
#1333 enhancement high Enhance Open Browser keywords to support Selenium service_log_path argument alpha 2
#1424 enhancement high Plugins should be last thing loaded in the SeleniumLibrary __init__ beta 1
#1425 enhancement high Add better support for plugin to add event firing WebDriver beta 1
#1426 enhancement high Change Open Browser keyword to register driver before selenium `get`is called beta 1
#1430 enhancement high Add better documentation support for plugins rc 1
#1284 bug medium Default Capabilities not set correctly if remote_url and desired_capabilities are given alpha 1
#1307 bug medium Get Cookies keyword will fail if the Selenium get_cookie method return value contains more keys than: name, value, path, domain, secure, httpOnly and expiry alpha 1
#1380 bug medium Selenium version number can also contain letters alpha 2
#1108 enhancement medium Propose new keyword: Wait For Location To Contain alpha 1
#1273 enhancement medium Deprecate loudly all silently deprecated keywords alpha 1
#1274 enhancement medium Remove keywords which where officially deprecated in previos releases. alpha 1
#1297 enhancement medium Add Wait Until Location Is keyword alpha 1
#1308 enhancement medium Update SeleniumLibrary is_truthy and is_falsy to follow Robot Framework 3.1 alpha 1
#1319 enhancement medium It should be possible to configure Open Browser keyword to not always open a new browser. alpha 2
#1330 enhancement medium Input Text and Input Password keywords should be configurable if they clear the input element before keywords types the text in alpha 1
#1336 enhancement medium Deprecate sizzle selector strategy alpha 1
#1346 enhancement medium Remove deprecated attributes of public API alpha 1
#1363 enhancement medium Allow setting and getting window.innerWidth and window.innerHeight CSS properties alpha 1
#1372 enhancement medium Enhance EXTENDING_SELENIUMLIBRARY.rst readability. alpha 2
#1379 enhancement medium When browser is closed and there is an error, the default run on failure functionality, Capture Page Screenshot, is run and it causes second exception alpha 2
#1402 enhancement medium Choose File keyword should not fail if file does not exist. alpha 2
#1404 enhancement medium When Selenium Grid is used the Input Text and Input Password keywords should not do file upload if input string poinst to a file beta 1
#1427 enhancement medium Enahnce window related keywords to work with multiple browsers beta 1
#449 bug low Update documentation on Choose File to show that it supports remote uploading alpha 1
#1279 enhancement low Webdriver tools browser_alias may not be needed alpha 1
#1301 enhancement low Update readme to mention https://github.com/Omenia/webdrivermanager alpha 1
#1332 enhancement low Add better support for FireFox Profile class rc 1

Altogether 34 issues. View on the issue tracker.