Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling "New Page" fails after creating the context using "New Persistent Context" with recordVideo argument #2214

Closed
ssallmen opened this issue Jul 27, 2022 · 1 comment · Fixed by #2524
Assignees
Labels
bug Something isn't working priority: critical
Milestone

Comments

@ssallmen
Copy link

Describe the bug
If the context is created using New Persistent Context and video recording is wanted by giving recordVideo argument a call to New Page using that context will fail.

To Reproduce

*** Settings ***
Library    Browser

*** Test Cases ***
Record Video with Browser.New Persistent Context
    &{recordVideo}=    Create Dictionary    dir=${OUTPUT_DIR}/videos
    Browser.New Browser    headless=False
    Browser.New Persistent Context    recordVideo=${recordVideo}
    Browser.New Page    https://google.com

Expected behavior
The call to New Page succeeds without any errors, taken that the arguments are correct.

Screenshots
Log file screenshot

Desktop (please complete the following information):

  • OS: Windows
  • Chrome
  • Browser library version 13.3.0

Additional context
The bug is in new_persistent_context method as it does not store the context uuid with the video size to the context_cache, as new_context does. And, _embed_video method called by new_page is expecting the video's context uuid to be in the context_cache to get the size of the video. This could be fixed by adding this call for example to the end of new_persistent_context method:
self.context_cache.add(response.id, self._get_video_size(params))

@ssallmen-pro
Copy link
Contributor

ssallmen-pro commented Nov 2, 2022

@mkorpela at al. Anyone looking into this? The bug is still valid with the latest versions:
robotframework==6.0
robotframework-browser==14.2.1

Quite easy to reproduce also. Just copy&paste the sample test suite above to a file and run it -> it will reproduce.

@Snooz82 Snooz82 self-assigned this Jan 7, 2023
@Snooz82 Snooz82 added this to the v15.0.0 milestone Jan 7, 2023
Snooz82 added a commit that referenced this issue Jan 7, 2023
Signed-off-by: René <snooz@posteo.de>
@Snooz82 Snooz82 closed this as completed in 4818d6b Jan 8, 2023
@Snooz82 Snooz82 added bug Something isn't working priority: critical labels Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: critical
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants