MarketSquare / robotframework-browser

Robot Framework Browser library powered by Playwright.
Apache License 2.0
499 stars 105 forks source link

Har is not saved when Browser Server is closed #3692

Open Pawci3oo opened 2 weeks ago

Pawci3oo commented 2 weeks ago

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):

Additional context

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

aaltat commented 2 weeks ago

@allcontributors please add @Pawci3oo for bugs.

allcontributors[bot] commented 2 weeks ago

@aaltat

I've put up a pull request to add @Pawci3oo! :tada: