Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile app don't get reset #752

Closed
DmytroChuchmaiBarges opened this issue Mar 18, 2024 · 2 comments
Closed

Mobile app don't get reset #752

DmytroChuchmaiBarges opened this issue Mar 18, 2024 · 2 comments

Comments

@DmytroChuchmaiBarges
Copy link

/wd/hub/session/<session_id>/appium/app/reset
in 2.34.2 version appium server log:

Calling AppiumDriver.reset() with args: ["313543cc-2613-4e64-96e2-0702ccc2281b"]
[ADB] Getting install status for co.myAPP.android.staging
[ADB] Running '/Users/myUser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm path co.myAPP.android.staging'
[ADB] 'co.myAPP.android.staging' is installed
[ADB] Running '/Users/myUser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell am force-stop co.myAPP.android.staging'
[ADB] Running '/Users/myUser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm clear co.myAPP.android.staging'
[ADB] Running '/Users/myUser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell dumpsys package co.myAPP.android.staging'

in 3.0.2 version appium server log:

[HTTP] --> POST /wd/hub/session/997a65e6-e183-449c-b44c-9da01c4f1b3a/appium/app/reset
[HTTP] {}
[AndroidUiautomator2Driver@56e8 (240d429a)] Calling AppiumDriver.reset() with args: ["997a65e6-e183-449c-b44c-9da01c4f1b3a"]
[AndroidUiautomator2Driver@56e8 (240d429a)] Resetting app mid-session
[AndroidUiautomator2Driver@56e8 (240d429a)] Running generic full reset
[AndroidUiautomator2Driver@56e8 (240d429a)] Deleting UiAutomator2 session
[AndroidUiautomator2Driver@56e8 (240d429a)] Deleting UiAutomator2 server session
[AndroidUiautomator2Driver@56e8 (240d429a)] Matched '/' to command name 'deleteSession'
...

The app does not actually reset and behaves as reset command was not sent at all.

@KazuCocoa
Copy link
Member

The latest 3.0.3 may raise an exception instead of working weirdly.
Please use mobile commands the above instead of deprecated endpoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants