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

[feature requst]: Attaching to Existing SessionId #907

Open
alijundi opened this issue Feb 15, 2025 · 7 comments
Open

[feature requst]: Attaching to Existing SessionId #907

alijundi opened this issue Feb 15, 2025 · 7 comments

Comments

@alijundi
Copy link

I have tried my best to attach to existing SessionId. I don't want to create a new session. I already know how to do that.

Is there a way to connect to existing session using appium dotnet client?

@KazuCocoa
Copy link
Member

I don't think selneium .net client doesn't provide such a feature. This project itself as well. Renamed to a feature request.

@KazuCocoa KazuCocoa changed the title [Bug]: Attaching to Existing SessionId [feature requst]: Attaching to Existing SessionId Feb 15, 2025
@Dor-bl
Copy link
Collaborator

Dor-bl commented Feb 15, 2025

Hi @nvborisenko, what's your estimated effort to add such feature if it's even possible on selenium side?

@nvborisenko
Copy link
Contributor

I propose to understand use case, hidden by the feature request. Opposite opinion would be "why not to keep existing client object, who initiated new session, instead of creating new client with attaching to existing session". Probably there is a better solution.

@Dor-bl
Copy link
Collaborator

Dor-bl commented Feb 15, 2025

@alijundi, I agree with @nvborisenko.
Can you please elaborate on your use case before we go any further?
Where exactly do you start the session you plan to "ride" in the following steps?

@alijundi
Copy link
Author

I need to use this similar to appium inspector. I want to connect to android and when I do that the existing session is terminated and a new one is made. In appium inspector I can attach to existing session making it much easier for debugging and will not create many stale sessions on the appium server. It is necessary! And much needed!

@nvborisenko
Copy link
Contributor

So you want to develop .net application, who can attach to the existing session? And evaluate it?

@Dor-bl I walk through selenium code quickly. Only one concern: when client starts new session, remote-end returns capabilities object which may be used later. So attaching as a concept doesn't applicable at all.

One more opinion from Firefox team:

Its not possible for WebDriver classic, but with BiDi you can attach a new client to the same session. Ideally you can even have multiple sessions which for now is implemented in Chrome but not yet in Firefox

Probably this opinion is not related to Appium.

In any case Selenium team can "expose a possibility" to attach to the session by ID, but before doing it let's clearly understand why we want to do it.

@Dor-bl
Copy link
Collaborator

Dor-bl commented Mar 16, 2025

@alijundi, in case you need us to add support, we first need to understand your motivation.

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