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

Feature: Add the ability to log in to pages #27

Open
fpapado opened this issue Oct 26, 2019 · 0 comments
Open

Feature: Add the ability to log in to pages #27

fpapado opened this issue Oct 26, 2019 · 0 comments

Comments

@fpapado
Copy link
Owner

fpapado commented Oct 26, 2019

Some flows might need the user to be logged in (via a Cookie, typically?) to get to the page we need to test.

It would be nice to have the option to do that!

I am not 100% settled on how we will achieve this.
My first thought was to add an option to read a cookie from a file.
However, that seems overly specific.

Another option would be having users to pass in a Puppeteer Page object by themselves. They could log in before hand, using selectors.

A middle ground would be to add an onBeforeAssert hook, that lets the user run scripts with the Page context. Would that be better? Worse? Horrible? Let's find out! :)

Prior art

BackstopJS has a setting cookies option, that allows loading cookies from a file. Maybe that would work as well?

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

1 participant