Skip to content

🐞 bug: Using multiple driver sessions doesn't work #55

@y-schwab

Description

@y-schwab

Is there an existing issue for this?

  • I have searched the existing issues

Appium Version

3.2.0

Appium Host Type

Command Line

Current Behavior

When creating more than one driver session in the same test it's not possible to interact with the drivers separately.

So for example, if I have the calculator session (driver) started and open another session in the notepad to copy and paste my calculator test results within the same test. When using calculatorSession.Quit() or Dispose(), it'll close the notepad app instead of closing the calculator one and then if I ran notepadSession.Quit() nothing would happen because the session was already closed and the calculator app would remain open.

I found the root cause for this bug: the commands weren't binded to the actual driver instance and so for each driver created it would lose the reference for the past drivers created during that test.

Expected Behavior

The expeteted behaviour would be for each driver to keep the reference to it's own session. So having multiple drivers running can work.

This way, calling driver1.Quit() and driver2.Quit() or whatever command works as expected, each on ti's own app.

Appium Log

No response

Environment Details

No response

Minimal Reproducible Example

To reproduce this just create two drivers in the same test and try to quit both of them to notice one of them will remain open.

Further Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions