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

How to use this official fixture and have every test method include the auth after login? #229

Open
two867 opened this issue Jun 29, 2024 · 1 comment

Comments

@two867
Copy link

two867 commented Jun 29, 2024

I want to use the code in pytest_playwright.py, but each page in there is a separate context, how can I use the page fixture in pytest_playwriht.py while carrying the auth information?

@BBmykola
Copy link

Hi @two867,

What i did is a bash script of 2 commands.

  1. run login with --save-storage=path_to_auth
  2. my tests with --load-storage=path_to_file

Don't know how good this solution is, but it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants