MarketSquare / MarketSquare/robotframework-browser
Har is not saved when Browser Server is closed
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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