Closed jhiver closed 1 year ago
Ah, yes, this is because Firefox's geckodriver doesn't allow concurrent sessions, combined with the fact that you're not calling and then awaiting Client::close
which would cleanly terminate the previous session before the next one is started. See the paragraph in the documentation on Client
. Adding a client.close.await?
before you return Ok()
should fix the issue :)
For higher-level operation, I recommend you use something like @stevepryde's thirtyfour
, which will probably make it easier to do things like keep state over time.
Hello & thanks for your library!
I have the following issue with this code:
When running the code multiple times, it results in a SessionNotCreated error with the following message:
Error: SessionNotCreated(WebDriver { error: SessionNotCreated, message: "Session is already started", stacktrace: "" })
I have to kill/restart geckodriver to be able to run the code again.
Any ideas how to fix it?
Also, it would be really handy to have some code in the README that shows how to save / reuse session/profile information such as cookies.
Thanks a lot!