The “driver_quit” functionality doesn’t work properly in appium@beta as well as in [email protected].
Instead of killing the driver and start it from the beginning, it starts from the place it was before. This means the app under the test is not killed but just stopped and after new “start_driver” opens from the last place it was opened in the previous test. This is not reproducible in version 1.21.0
Environment
Appium version (or git revision) that exhibits the issue: appium@beta as well as [email protected]
Last Appium version that did not exhibit the issue (if applicable): 1.21.0
Desktop OS/version used to run Appium: Mac OS BIG SUR 11.5.2 (20G95)
Node.js version (unless using Appium.app|exe): v14.16.1
Mobile platform/version under test: iOS 14.7.1, iOS
15 Beta
*Real device or emulator/simulator: Real device
for example:
def setWiFiState(targetState)
$driver = $testEnvironment.newDriverWithBundleID("com.apple.Preferences")
$driver.start_driver
sleep(1)
pressElement(wiFiCell, WAIT_TIMEOUT)
sleep(5)
setSwitchToTargetState(targetState) {wiFiSwitch}
$driver.driver_quit
puts "OK - the Wi-FI switch is set to \"#{targetState}\""
end
so the next
$driver = $testEnvironment.newDriverWithBundleID(“com.apple.Preferences”)
$driver.start_driver
will be started from the WIFI Settings screen instead of the iOS Settings screen which is wrong. The driver is not killed and after performing $driver.driver_quit just stays on the WIFISettings screen
and there is no any error message for that.
Same thing. I have even uninstalled everything and installed again - the same result. On appium 1.21.0 it kills the driver on 1.22.0-beta.0 it doesn’t. I also removed my Xcode Beta
The thing is I cannot add any logs after
“$driver.driver_quit”
because appium tells me that
" A session is either terminated or not started (Selenium::WebDriver::Error::InvalidSessionIdError)
NoSuchDriverError: A session is either terminated or not started"
So I can provide only logs before this place
“$driver.driver_quit”
It looks like that driver was stopped but not killed, and the next start just awake it and it continue from the same place it was stopped.
It could be because I have few precondition steps where the driver starts and then quits before code from my example. But in that preconditions it is also not killing the driver, interesting that it is visible in the logs because in my example right after “$driver.driver_quit” I cannot get any logs, only error about the session.
Hi all. I have the same issue like sashok644 mentioned, it is not possible to close driver when I run automation tests from IntelliJ and also not possible to close application from Appium when close Appium inspector. It was working normally with Appium 1.21, with Appium 1.22 (XCode 13.0) does not work.
I saw that the terminate_app command helped to sashok644, but I am interested how to use it in Appium inspector to make it work. Thanks.