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

Single setup before starting concurrent cluster? #507

Open
DawidOskwarek opened this issue Jan 17, 2023 · 2 comments
Open

Single setup before starting concurrent cluster? #507

DawidOskwarek opened this issue Jan 17, 2023 · 2 comments

Comments

@DawidOskwarek
Copy link

Hey, sorry if this was answered before.

Is there a way to perform a single action/function before starting a concurrent cluster? I want to be able to sign in to a website once, and then every concurrent page that I start in a cluster will not have to log in again. How would I go about it? Any examples out there?

@stoddabr
Copy link

stoddabr commented Feb 6, 2023

Depending on how the authentication is setup on the website (eg, if they support cookie sessions) if you run with the CONCURRENCY_PAGE setting then all other pages may be authorized after the first sign in

@DanielXavierJob
Copy link

As our dear friend replied above, using the concurrency: Cluster.CONCURRENCY_PAGE setting in the launch configuration, you can pass settings, cookies, localStorage from one browser to another, this way if the method of using the login whether by cookies, session, etc., this state will be passed on.

If not, you can create a Login class where it performs the steps to login, usually sites with login show when you are logged in, prefer to check if the user is logged in, if not, run this login steps function, then continue. Hope this helps!

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

3 participants