Metadata-Version: 2.1
Name: robotframework-browser-tray
Version: 1.2.0
Summary: Tray icon to start the Chromium installed by Browser Library
Author-email: Marduk Bolaños <marduk.bolanos@imbus.de>
Requires-Python: >=3.8.2
Description-Content-Type: text/markdown
Requires-Dist: pystray>=0.19.5
Requires-Dist: robotframework-browser>=18.0.0

# robotframework-browser-tray

A tray icon for starting the Chromium installed by [Browser Library](https://robotframework-browser.org/)

**Requirements**

- NodeJS >= 18
- Windows


## Use Cases

- Execute tests incrementally using e.g. [RobotCode](https://github.com/d-biehl/robotcode)

- Test selectors in an open web page interactively using [irobot](https://pypi.org/project/robotframework-debug/)


## How to use it

1. Install the package

```bash
pip install robotframework-browser-tray
```

2. Execute `browser-tray`

3. Click on the tray icon with the Chromium logo and select `Open Chromium`

4. Add these lines to the top of the .robot file with your tests:

```robotframework
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:

```bash
browser-tray --pw-port=XXXX --cdp-port=XXXX
```

## 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`.

