Initializing two drivers for one simulator

Hi everyone,
i have a problem using 2 different drivers on one emulator within a testsession.
I thought i can simply use a different wdaLocalPort for both drivers, but that does not work,
because the wda on the emulator is reinstalled and than the first driver session is removed.

Can anyone help me out with the correct way, to handle two drivers which connect to the same simulator device ?

You don’t explain the problem very well but maybe this will help:

iOS, because you said, ‘simulator’ in the title:

Android, because you also said, ‘emulator’ in the body:

If those don’t help, give more detail on the problem at hand.

Ok sorry, i thought it was clear enough.
My problem is that i have a native app (iOS and Android) which also have some views made by flutter.
I think i have to use 2 drivers in one session. One native driver (iOS/Android) and a flutter driver so that i can dynamically switch the driver when i want to interact with the native elements or the flutter elements.

I can use 2 drivers in one session when i use 2 simulators/emulators but when i try to have 2 drivers on one simulator, the first session is gone after the 2nd driver is initialized. I thought its enough to set different localPorts and wdaLocalPorts but no luck until now.

So i’m not 100% sure if it is possible with appium to use 2 drivers on one emulator/simulator.

You could use 2 drivers, but not at the same time. You’d have to stop one and then start the other. You might be able to keep app state with the noReset capabilities, but I’m not really sure.

I did do a web search for any tutorials on this kind of thing but did not find any. There are some good Flutter tutorials but it doesn’t sound like they would help you here.

Here is a good rundown on Appium drivers and how they work, which unfortunately doesn’t include any mention of the Flutter driver but may give you more insight into Appium drivers and how they work: