Tray icon to start the Chromium installed by Browser Library
Project description
robotframework-browser-tray
A tray icon for starting the Chromium installed by Browser Library
Requirements
- NodeJS >= 18
- Windows
Use Cases
-
Execute tests incrementally using e.g. RobotCode
-
Test selectors in an open web page interactively using irobot
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.BrowserRepl
ibrowser
ibrowser allows testing selectors in an open web page interactively. In addition to the selectors supported by Browser library,
it adds the selector role
for selecting elements using their ARIA role.
The role of an element can be easily obtained from the Accessibility Tree. To open the tree follow these steps:
- Press F12 to open the DevTools
- Select the Elements tab
- In the right panel click on the Accessibility tab
- In the section "Accessibility Tree" check "Enable full-page accessibility tree"
- Click the button "Reload DevTools"
- In the left panel click on the person icon to toggle the Accessibility Tree view
Usage in a Robot Framework Test Suite
Add these lines to the top of the .robot file:
Library Browser playwright_process_port=55555
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:
- Close all instances of Microsoft Edge
taskkill /F /IM msedge.exe
- Start Microsoft Edge with
Windows + R
msedge.exe --remote-debugging-port=1234
How it works
On start up it checks whether rfbrowser init chromium
has been executed in the current environment.
If this requirement is met the Playwright wrapper is started with node site-packages/Browser/wrapper/index.js 55555
.
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 imports Browser library, connects to Chromium (if it is running) and adds some convenient selectors.
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_tray-1.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ab091eb544e3b8305b29d364ff9c8859405efd9e1fbd110e3aa7f5eed256192 |
|
MD5 | 9c3e169b2dada80562578c3634cbb31f |
|
BLAKE2b-256 | a649fca7e68c0966132e3ceb47f8ddf996a310fb4f59bc480dcc1f831480ff7f |
Hashes for robotframework_browser_tray-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aab1a59cf2c6f6a459a2bd154bbc5d1dc3bcd5d8a0bfbf175e9e661793ad8872 |
|
MD5 | 4ced620f84f44c674da0540d9b088d32 |
|
BLAKE2b-256 | 4c002f84050738dd6da0b558efb41011ee8baa35356dae2e76a6c77ec698ce84 |