MarketSquare / MarketSquare/robotframework-browser

Har is not saved when Browser Server is closed

Open
#3,692 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority: high
Dominant language
Python
Stars
655
Forks
147
Avg merge
5h 27m
Merged PRs (30d)
59

Description

**Describe the bug**
Har file is not saved when Browser Server is closed using **Close Browser Server** keyword.

**To Reproduce**
Steps to reproduce the behavior:
```robotframework
${options_chrome}= Create List
Append to List ${options_chrome} --remote-debugging-port=10000
${ws_endpoint} Launch Browser Server browser=chromium headless=False handleSIGHUP=False handleSIGINT=False handleSIGTERM=False args=${options_chrome} reuse_existing=True
${har} Create Dictionary path=${REPO_DIR}${/}browser${/}har.file
Connect To Browser http://localhost:10000/ use_cdp=True
New Context recordHar=${har}
New Page URL
Close Browser Server wsEndpoint=${ws_endpoint}
```

**Expected behavior**
Context and browser are closed. The HAR file is saved in the provided path

**Desktop (please complete the following information):**
- OS: Windows 11
- Browser chrome
- Version 126.0.6478.127

**Additional context**
- Python: 3.9.7
- Robotframework: 6.0.2
- Robotframework-browser: 18.6.3

I see that Browser and context for provided ws_endpoint are closed but the har file is not saved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Close Browser Server keyword and reproduce the issue with the provided Robot Framework example, focusing on the wsEndpoint, context shutdown, and HAR path. Confirm the context and browser close successfully and that the HAR file is written to the provided path when the keyword finishes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.