This is the test case
@pytest.mark.order("last")
@allure.testcase("Logout of the app")
def test_logout(self):
if BasePage(self).isDisplayed(ProfilePage(self).ProfileButton, "xpath"):
with allure.step("Click on Profile"):
ProfilePage(self).clickProfile()
with allure.step("Clck on Settings"):
ProfilePage(self).clickSettings()
with allure.step("Click Logout"):
ProfilePage(self).logout()
else:
while not BasePage(self).isDisplayed(ProfilePage(self).ProfileButton, "xpath"):
BasePage(self).clickElement(ProfilePage(self).BackButton, "id")
continue
Only happening for this case
This is the logs from Appium
--> POST /session/7a85f1aa-7063-4504-8e96-e48f95806848/element
[HTTP] {"using":"xpath","value":"//android.widget.FrameLayout[@content-desc='Profile']/android.widget.FrameLayout/android.widget.ImageView"}
[debug] [AppiumDriver@48ab] Encountered internal error running command: NoSuchDriverError: A session is either terminated or not started
[debug] [AppiumDriver@48ab] at asyncHandler (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\protocol.js:315:15)
[debug] [AppiumDriver@48ab] at C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\protocol.js:518:15
[debug] [AppiumDriver@48ab] at Layer.handle [as handle_request] (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[debug] [AppiumDriver@48ab] at next (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\route.js:144:13)
[debug] [AppiumDriver@48ab] at Route.dispatch (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\route.js:114:3)
[debug] [AppiumDriver@48ab] at Layer.handle [as handle_request] (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[debug] [AppiumDriver@48ab] at C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:284:15
[debug] [AppiumDriver@48ab] at param (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:365:14)
[debug] [AppiumDriver@48ab] at param (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:376:14)
[debug] [AppiumDriver@48ab] at Function.process_params (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:421:3)
[debug] [AppiumDriver@48ab] at next (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:280:10)
[debug] [AppiumDriver@48ab] at logger (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\morgan\index.js:144:5)
[debug] [AppiumDriver@48ab] at Layer.handle [as handle_request] (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[debug] [AppiumDriver@48ab] at trim_prefix (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:328:13)
[debug] [AppiumDriver@48ab] at C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:286:9
[debug] [AppiumDriver@48ab] at Function.process_params (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:346:12)
[debug] [AppiumDriver@48ab] at next (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\express\lib\router\index.js:280:10)
[debug] [AppiumDriver@48ab] at C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\body-parser\lib\read.js:137:5
[debug] [AppiumDriver@48ab] at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
[debug] [AppiumDriver@48ab] at invokeCallback (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\raw-body\index.js:238:16)
[debug] [AppiumDriver@48ab] at done (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\raw-body\index.js:227:7)
[debug] [AppiumDriver@48ab] at IncomingMessage.onEnd (C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\node_modules\raw-body\index.js:287:7)
[debug] [AppiumDriver@48ab] at IncomingMessage.emit (node:events:514:28)
[debug] [AppiumDriver@48ab] at endReadableNT (node:internal/streams/readable:1359:12)
[debug] [AppiumDriver@48ab] at processTicksAndRejections (node:internal/process/task_queues:82:21)
[HTTP] <-- POST /session/7a85f1aa-7063-4504-8e96-e48f95806848/element 404 5 ms - 3257