A tray icon for starting the Chromium installed by Browser Library
Requirements
- NodeJS >= 18
- Windows
-
Execute tests incrementally using e.g. RobotCode
-
Test selectors in an open web page interactively using irobot
- 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 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
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
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
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.