How can close windows app when the session created with "appTopLevelWindow" capability?

Hi,

My tested app sometimes had started 2 times, when the session/driver is created. I added the “ms:waitForAppLaunch” capability but it did not help.
So, I decreased the “createSessionTimeout” and after the session creation is failed I attached a new session to the previously started app with the “appTopLevelWindow” capability
It is suggested by https://github.com/microsoft/WinAppDriver/issues/890

It helped to start the app, just once, and attach session to it, but in this case the app is not close when I call the session.quit or session.close.
I see that the WinAppDriver supports a /forcequit command parameter which maybe can help.
How can I pass this parameter by Appium to webappdriver?
(I’m using it from java)

Is there any idea for my problem?

Thanks!

My bad!

With the “closeApp” can close the application