You can definitely connect to the running emulator, you need to pass udid
as capability. It works both for Android and iOS.
For Android use adb devices
to get the value, for iOS - instruments -s devices
. But if you connect only 1 device/emulator, you can ignore it.
To save installation time aka install only once, you can check reset strategies and find what works for you:
e.g. for Android adding capability noReset: true
will leave app as is on device after session is closed. When you start the 2nd Appium session, it will skip cleanup and simply open the app. Note: app cache won't be cleaned and may affect the test.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…