Moving Robot Framework browser automation to 2020 (or 2021)

Released Browser Library 0.9.0

Changes from 0.8.0:
Added:
Get Element - reference to a Playwirght element handle
Get Style - Gets the computed CSS properties of an element
Http - for making http requests directly from page context
Ability to execute Browser library keywords on background with:
Promise To, Wait For and Wait For All Promises

Renamed:
Local Storage Clear, Get, Remove, Set and SessionStorage Clear, Get, Remove, Set
to
LocalStorage Clear, Get Item, Remove Item, Set Item and SessionStorage Clear, Get Item, Remove Item, Set Item.

Renamed:
Create Browser, Create Context, Create Page
to
New Browser, New Context, and New Page.

Library is now usable directly from Python. It can also be used with pytest and has type hints for better support of autocompletion.

Does this mean I do not need to install node ?
That is my major blocking point to experiment the library.

Unfortunately yes you do.

I would like to have just a single library install.
For example, I like AppiumDesktop because it brings its own instance of node.js :slight_smile:

I would also like this in the future, that a pip install just does everything.

1 Like

Hi @davidk1

@mkorpela had the initial idea and his idea to go with playwright is in my opinion the right one.

Basically some puppeteer developers are founders of Playwright.
Playwright has Cross-Browser support and better Context management.

This blogpost describes is quite clear.

And regarding Cypress:
Cypress is a full framework with tests and assertions and execution engine that does some magic. and we “just” needed a super fancy nice automation API.
The framework must be Robot.

Also Playwright has super cool selectors and work awesomely well with WebComponents and ShadowDoms.

I never had a second of regret that mikko chose Playwright.

2 Likes

I actually suggested Puppeteer first to Tatu and he made the leap even further with Playwright.

Oh. Ok.
Then no honor to Mikko and all the honor goes to Tatu Aalto :joy:

1 Like

This is my first day back to work after vacations – I thought to start it with something new and try this out :slightly_smiling_face: After writing few tests it feels like a really nice solution; my only struggle was me being still bit on vacay mode and ignoring first the need for Python update :crazy_face:

Was there a plan to include DeviceDescriptors? I have been using Puppeteer since April and those have been quite useful.

1 Like

Lets put it on the list :slight_smile:

1 Like

@René Makes sense. Thank you for clarification.

https://github.com/MarketSquare/robotframework-browser/releases/tag/v0.12.0 New Release. Some pretty breaking changes included.

  • Autoclosing feature which will automatically close contexts and pages when the context they were opened in closes (so a global __init__.robot suite setup opened page will stay open for all tests, normal suite setup items stay open for the suite and test setups close for tests).
  • @aaltat contributed us some Cookie keywords, so most things you would want to use cookies for should now be possible.-
  • File uploading and waiting for file downloads (check the kw docs for specifics).
  • Get BoundingBox to get element sizes and locations
  • More examples in README
  • rfbrowser init is back because executing the dependency downloads on library import had stability issues
2 Likes

But I usage Puppeteer with Robot Framework have error : Keyword ‘Capture Page Screenshot’ could not be run on failure: Maximum limit of started keywords exceeded.