Robot Framework Browser 14.0.0 Release!

Release is out! :robot: :lonkero:

We have done some really nice features lately, but you have to be aware, that some of them also come with deprecation of others.
We have tried to make the transition to the newer behaviour as smooth as possible.

BACKWARDS INCOMPATIBILITY:

Argument names** expected_value and similar #2329

There were four keywords that did use these “old” name for the assertion_expected argument.
That has changed and that may cause a real failure if you have used it as named argument before.
Keywords are:

Get Checkbox State
Get Element Count
Get Table Cell Index
Get Table Row Index

Added scope to timout, assertions and strict mode.

See below for more

DEPRECATIONS:

Positional Arguments for Import , New Browser , New Context & New Persistent Context #2328

These keywords do have a huge amout of arguments and they are not really usable as positional arguments.
Therefore we have now deprecated the positional arguments and will move to ‘named-only-arguments’ .
That brings the advantage, that arguments can be sorted alphabetically in the docs.
There is a warning coming, if you use one of these positional and now deprecated arguments.

Delay converted to Timedelta (Robot Framework time syntax) #2330

Keyboard Input has now a timedelta as type for the delay argument. Before it was integer in milliseconds
Mouse Button has now a timedelta as type for the delay argument. Before it was integer in milliseconds

BUGFIXES:

Switch Page fails when context and browser id are given as well. #2327

Switch Page worked only if you have used it with CURRENT or ALL in context or browser argument. Now you can also switch to a specific browser
 (LOW prio)

New Context with viewport set to None does not behave as in Playwright #2054

*** Settings ***
Library     Browser 

*** Test Cases *** 
Open Chromium Maximized 
    New Browser    chromium    headless=false    args=["--start-maximized"]
    New Context    viewport=${None}
    New Page       https://browser.fi

This usage of chrome args together with viewport ${None} will create a full screen browser on windows machines. Not tested on Linux, Not working on Mac.

FEATURES:

Wait For Condition to check any information that may happen on page
 #2331

Waits for a condition, defined with Browser getter keywords to become True.
This Keyword is basically just a wrapper around our assertion keywords, but with a timeout. It can be used to wait for anything that also can be asserted with our keywords.

Wait For Condition    Element States    id=cdk-overlay-0    ==    detached
Wait For Condition    Element States     //h1    contains    visible    editable    enabled    timeout=2 s
Wait For Condition    Title    should start with    Robot
Wait For Condition    Url    should end with    robotframework.org

This is no rocket science but it is pretty handy.

Added Scope feature to Set Browser Timeout , Set Retry Assertions For and Set Strict Mode #2319

With this new argument you can define, that a setting is not longer global for all following test cases/tasks but just valid for this actual suite or test/task.
Therefore it is much more unlikely to negatively affect your following test, by a failed one, that has not reset this setting in Teardown.
Available Scopes are:
Global which means, that all i.e. timeouts set before are now overwritten and from now on this timeout will be in place.
Suite whick means, that for the current suite and all including tests/tasks or even suites that setting is set. It will be reset to the previous setting on suite ending.
Test & Task means that the setting is only valid for this test case.By default Suite is set, which means that this feature may cause Backwards Incompatibility :warning: because before all settings where always global


Keyword Call Banner as css overlay on page

This feature has already been in in 13.6.0 Release, but afaik not really presented here.
I showed some PoCs before.With the import setting show_keyword_call_banner or with the keyword Show Keyword Banner it is now possible to activate and deactivate an overlay that shows the currently executed Browser keyword as css overlay on the page.
As you can see in the attached video, with that feature it is now possible to see picture by picture which keywords are executed right now with which data.
The variables are resolved here


Please test 14.0.0 and have fun with the new features.Features planned for the next Release:

  • Tap keyword for tapping on a touchscreen
  • Set Selector Prefix keyword to add a prefix to ALL selectors used, when this setting is active. Scope will be there as well but needed to be implemented first.

Cheers your Browser Team,
@mkorpela , @aaltat , @xylix & @René

4 Likes

Facing problems with “Wait For Condition”. Details can be found here - "Wait for Condition" not working if Selenium Lib is installed · Issue #2373 · MarketSquare/robotframework-browser · GitHub