No project description provided
Project description
robotframework-browser
:construction_worker: :construction: Work in Progress :construction: :performing_arts:
Robot Framework Browser library powered by Playwright. Moving browser automation to year 2020 (or 2021)!
Aiming for :rocket: speed, :white_check_mark: reliability and :microscope: visibility.
Supporting testing and automation with Robot Framework and Python.
Official post about this venture.
Installation instructions
- Install node.js e.g. from https://nodejs.org/en/download/
- Install robotframework-browser from the commandline:
pip install robotframework-browser
- Install the node dependencies needed to run Playwright from the commandline:
rfbrowser init
Development
Development environment
Install Python, nodejs and yarn. Make sure you have make
available.
Setup development environment with make dev-env
.
This creates a Python virtualenv in .venv directory, and install both Python and
nodejs dependencies.
To update the dependencies use either make dev-env
to update all or
alternatively make .venv
or make node-deps
to update only Python or nodejs
dependencies, respectively.
Make sure to run source .venv/bin/activate
to activate the correct virtualenv
Development in Windows
Install Chocolatey and then install development tools with
choco install sed make
.
After that, the development workflow should work as described in the previous chapter.
The only difference is that the virtualenv needs to be activated by running
.venv\Scripts\activate
in the command prompt.
Testing
There are both unit tests written with pytest and acceptance test written with
Robot Framework. These can be run manually with make utest
and make atest
. To rerun failed tests you can use make test-failed
The tests are also executed in a prepush hook.
Running tests in docker container
Docker container builds a clean install package. This can be used to check that builded package works correctly in clean environment without development dependencies.
Note atest test app start in __init__.robot
requires a small change as the path is /atest/demoapp/server.py
and not atest/demoapp/server.py
in this case.
- Build the container
make docker
- Run tests mounted from host machine
make docker-test
. - See results in
atest/output
Releasing
- Ensure generated code and types are up to date with
make build
- Ensure tests and linting pass on CI
- Check that you have permissions to release on Github and PyPi
- Use
make release
to create and release artifacts and upload to PyPi - Create Github release
Code style
Python code style is enforced with flake8 and black. These are executed in a
precommit hook, but can also be invoked manually with make lint-python
.
JS / TS code style is enforced with eslint. Lints are run in precommit hooks, but can be run manually with make lint-node
.
Architecture
Python Library <--> gRPC <---> TypeScript and Playwright
Contributors
This project is community driven and becomes a reality only through the work of all the people who contribute. Supported by Robocorp through Robot Framework Foundation.
Mikko Korpela 💻 |
Tatu Aalto 💻 |
Antti Karjalainen 🔍 |
Ismo Aro 🔍 |
Janne Härkönen 💻 |
Kerkko Pelttari 💻 |
Robocorp 💵 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for robotframework-browser-0.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 490b62cf763d383b645298d7afeb733d0d03b5ee1579861553d42bf2c62a890f |
|
MD5 | eaaa5cd4a1acf629b222a0ebc26fe294 |
|
BLAKE2b-256 | 3a604f1b0f188944aa561df98d7f03aaa7cf1640de254b9b08e18476a45eaf4e |
Hashes for robotframework_browser-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd824e795c18253aab4e96d6e787f0c8e3edddebd4f7d4c783fdd1243ee10fc6 |
|
MD5 | db9d7bf06f627cdaaaa91eb52ea10b7c |
|
BLAKE2b-256 | 0d114b1b57c33e9824abf21be7fa1b5764cd2fe07db5ebf407d75955626d09df |