Why "back" button doesn't work after i tap something

Hello, using Appium 1.15.1, writing tests on python, why when i’m trying to press “back” button with driver.back() or driver.press_keycode(4) it doesn’t go back?
For example, i entered in google chrome, then i use driver.back() or driver.press_keycode(4), but it doesn’t go back.
Also, when in test only driver.back() or driver.press_keycode(4) it works properly

[HTTP] ← POST /wd/hub/session/6986406d-78ad-41f1-8add-5b188a014abd/element/e76ca068-3943-4121-b5dc-eb3f4c512ce2/click 200 113 ms - 14


[HTTP] → POST /wd/hub/session/6986406d-78ad-41f1-8add-5b188a014abd/appium/device/press_keycode

[HTTP] {“keycode”:4,“sessionId”:“6986406d-78ad-41f1-8add-5b188a014abd”}

[W3C (6986406d)] Calling AppiumDriver.pressKeyCode() with args: [4,null,null,“6986406d-78ad-41f1-8add-5b188a014abd”,null,“6986406d-78ad-41f1-8add-5b188a014abd”]

[WD Proxy] Matched ‘/appium/device/press_keycode’ to command name ‘pressKeyCode’

[WD Proxy] Proxying [POST /appium/device/press_keycode] to [POST http://localhost:8204/wd/hub/session/7d8c49d8-af76-49b7-befc-317b44dabc73/appium/device/press_keycode] with body: {“keycode”:4,“metastate”:null,“flags”:null}

[WD Proxy] Got response with status 200: {“sessionId”:“7d8c49d8-af76-49b7-befc-317b44dabc73”,“value”:null}

[W3C (6986406d)] Responding to client with driver.pressKeyCode() result: null

[HTTP] ← POST /wd/hub/session/6986406d-78ad-41f1-8add-5b188a014abd/appium/device/press_keycode 200 1058 ms - 14

Upgrade appium to beta level & try self.driver.back() for back action

1 Like