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

Support multiple Firefox instances #882

Closed
zdm opened this issue Aug 17, 2017 · 7 comments
Closed

Support multiple Firefox instances #882

zdm opened this issue Aug 17, 2017 · 7 comments

Comments

@zdm
Copy link

zdm commented Aug 17, 2017

In phantomjs and chromedriver I can POST /session to create new browser session.
But, seems, that with geckodriver I can have only one session, all subsequent requests returning "Session is already started".
How I can start multiple sessions using single geckodriver process?
Is it possible at all or I should run new geckodriver instance each time, when I need new session?

@andreastt
Copy link
Contributor

You need multiple geckodriver processes to create multiple sessions. One session of geckodriver can only host a single Firefox process.

In phantomjs or the client you’re using, this should merely be an implementation detail.

@andreastt
Copy link
Contributor

It is of course possible to patch geckodriver so that it can support multiple instances of Firefox, but this is not something that is on our list of priorities.

@zdm
Copy link
Author

zdm commented Aug 17, 2017

I understood, thank you for reply.

@andreastt
Copy link
Contributor

I actually quite like the idea that a single geckodriver could support multiple Firefoxen. I am going to leave this bug open for tracking.

@andreastt andreastt changed the title How I can use several sessions? Support formultiple Firefox instances Aug 17, 2017
@zdm
Copy link
Author

zdm commented Aug 17, 2017

Yes, this would be perfect and would allow to operate different webdrivers in the same way.

@klausenbusk
Copy link

Is there anyway I can get the active session id? I need it, so I can kill the session if our program crash between a session create and delete.

@andreastt
Copy link
Contributor

@klausenbusk To prevent hijacking of sessions, it’s not possible to get a list of session IDs from WebDriver.

The session ID is only returned from the initial session creation request. If you need to keep track of it in case the program crashes, you could try e.g. serialising it to disk with the understanding that other processes on the system could interfere with it.

@whimboo whimboo changed the title Support formultiple Firefox instances Support multiple Firefox instances Nov 23, 2018
@zdm zdm closed this as completed Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@andreastt @zdm @klausenbusk and others