robotframework-browser icon indicating copy to clipboard operation
robotframework-browser copied to clipboard

Har is not saved when Browser Server is closed

Open Pawci3oo opened this issue 7 months ago • 4 comments

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:

${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.

Pawci3oo avatar Jul 11 '24 07:07 Pawci3oo