One task works. How do I run several at once?
Give each parallel task its own browser session. Your program controls how many run at the same time and releases each slot when its task finishes.
- Turn the single-task workflow into a repeatable operation that creates its own Session each time it runs.
- Limit the number of simultaneous tasks using the project’s concurrency limit and its existing active sessions.
- Record each result, try to close the task’s session after success or failure, then start the next task.
When login is required, use a separate Context for each account and use the same Context in read-write mode sequentially. If several tasks modify the same record on a website, your program also needs to coordinate their order.
