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

feat: Add reconnection capability for persisted WebDriver sessions #276

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

surajk-m
Copy link
Contributor

Closes #57

The with_existing_session method introduces the ability to reconnect to an already established WebDriver session using its session ID. This enables reuse of an active session without having to create a new one, which is particularly beneficial in scenarios such as process restarts or unexpected disconnections.

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 76.11940% with 16 lines in your changes missing coverage. Please review.

Project coverage is 62.94%. Comparing base (29bbfa7) to head (e15af90).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/client.rs 0.00% 13 Missing ⚠️
src/session.rs 94.44% 3 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/session.rs 75.03% <94.44%> (+1.44%) ⬆️
src/client.rs 63.06% <0.00%> (-0.75%) ⬇️

... and 3 files with indirect coverage changes

Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition, thank you! Just a few smaller bits to tidy up.

src/session.rs Outdated Show resolved Hide resolved
src/session.rs Outdated Show resolved Hide resolved
src/session.rs Outdated Show resolved Hide resolved
src/session.rs Outdated Show resolved Hide resolved
src/session.rs Outdated Show resolved Hide resolved
- Use `::new` in both session creation and reconnection paths
- Modify and return the existing client instance directly
Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking quite good now, really just nits left :)

src/session.rs Outdated Show resolved Hide resolved
src/session.rs Outdated Show resolved Hide resolved
src/session.rs Outdated Show resolved Hide resolved
Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thank you!

@jonhoo jonhoo merged commit dd5d670 into jonhoo:main Nov 25, 2024
19 checks passed
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

Successfully merging this pull request may close these issues.

Add a way to reconnect to an existing session
2 participants