[Python] Reusing context with Python Playwright

Discussão em 'Python' iniciado por Stack, Agosto 3, 2025.

  1. Stack

    Stack Membro Participativo

    Has anybody been into this use case in using python Playwright .

    I wanted to use playwright to a website with login features. So, as normal process, it will login to the website with its loging credentials. Once logged in, the page will stay open, even the process is already finished.

    Then, another process would run, if it has the same login credentials, then it will just give that open page. If it has different login credentials, then it will open up another to login.

    My question is:

    1. Is it possible?
    2. If it is, can also use it with run-server, so that I will only have one browser, then just use context to separate it session.

    Also, can you please provide a snippet on how to implement it. Im just new to it.

    Thanks alot.

    Continue reading...

Compartilhe esta Página