Tray icon and REPL for trying out Browser Library keywords using Chromium or Edge
Project description
robotframework-browser-tray
Tray icon and REPL for trying out Browser Library keywords using Chromium or Edge
Requirements
- NodeJS >= 18
- Windows
Use Cases
-
Execute tests incrementally using e.g. RobotCode
-
Test selectors in an open web page interactively
How to use it
- Install the package
pip install robotframework-browser-tray
- Execute
browser-tray
Hint: In case your environment does not allow executing browser-tray, call the Python module directly:
python -m BrowserTray
-
Click on the tray icon with the Chromium logo
-
Open a Terminal and execute
ibrowser
Hint: In case your environment does not allow executing ibrowser, call the Python module directly:
python -m BrowserTray.Repl
ibrowser
ibrowser allows testing selectors in an open web page interactively.
To start it execute:
ibrowser
On start up it connects to a running Chromium (started using the tray icon) or Microsoft Edge (see below for instructions).
If you start a new browser while ibrowser is running, call the keyword "Connect" to connect ibrowser to it.
To exit ibrowser press Ctrl-D
.
Usage in a Robot Framework Test Suite
Add these lines to the Settings section of the .robot file:
Library Browser playwright_process_port=4711
Test Setup Connect To Browser http://localhost:1234 chromium use_cdp=True
In order to use other ports execute:
browser-tray --pw-port=XXXX --cdp-port=XXXX
Using Microsoft Edge
If Microsoft Edge is installed on your machine:
- Create a Shortcut to msedge.exe with the target:
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --remote-debugging-port=1234 --user-data-dir=C:\Users\YOUR_USER\RFEdgeProfile
-
Start Edge using this shortcut
-
Execute
ibrowser
How it works
On start up browser-tray
checks whether rfbrowser init
has been executed.
If this requirement is met the Playwright wrapper is started with node site-packages/Browser/wrapper/index.js 4711
.
Selecting "Open Chromium" in the tray icon executes site-packages/Browser/wrapper/node_modules/playwright-core/.local-browsers/chromium-XX/chrome-win/chrome.exe --remote-debugging-port=1234 --test-type
.
ibrowser
is a batteries-included irobot that saves time by importing Browser Library and connecting to a running Chromium or Edge.
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
File details
Details for the file robotframework_browser_tray-1.6.0.tar.gz
.
File metadata
- Download URL: robotframework_browser_tray-1.6.0.tar.gz
- Upload date:
- Size: 62.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5986a05a1dc9aa73355a72c2a712e3527915719b14929644dda60482fd2b3e8f |
|
MD5 | 809c455b956deb10930f78016081cdc4 |
|
BLAKE2b-256 | 6d7402f7d8e410821d1efc42606f7ce169a00e6325cc34ce874469d3684d6a6c |
File details
Details for the file robotframework_browser_tray-1.6.0-py3-none-any.whl
.
File metadata
- Download URL: robotframework_browser_tray-1.6.0-py3-none-any.whl
- Upload date:
- Size: 61.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ab43962222f4d9a49a702ebef843858f789af118f418caf492b87928e4ac665 |
|
MD5 | 67672f1185b7fbe68f25fd886b8977ef |
|
BLAKE2b-256 | 58a48ab4a89e8c75ae04c3de59d4ab3dace441cd635c71e62d759d581b6154af |