Rayrun
← Back to Discord Forum

launch_persistent_context with video mode retain-on-failure

lirangofer

Hello, I need you help please. I use playwright python with launch_persistent_context. What I am trying to do is catch automatic video record on failures (retain-on-failure) and save them on specific folder. I tried to use browser_context_args but nothing

This thread is trying to answer question "How can I catch automatic video records on failures and save them in a specific folder using launch_persistent_context in Playwright Python?"

7 replies
lirangofer

@mxschmitt please if you can help me

launch persistent context won’t work with that. Why are you using launch persistent context?

lirangofer

Because I work with POM and each page act as a class. When I change the context between pages I need that the session will be the same. Not a new session beween pages

lirangofer

I though for a workaround. To capture all the videos but save only the filed test. What you think?

lirangofer

@mxschmitt if you can answer please

This is not supported, we enforce a new context for each test, so each test can run independently.

lirangofer

there is an option that a "test" will be combined with multiple test_ defs in a class?

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].