Appium create new session but the new session is not used while making post or get call


#1

The problem
I have two test case in my feature file and am trying to run test one-after-another, on a single device, my first test get successful but my second test case fail, ideally both test case are same, if I run one test case the result is positive, but when I run continuously one after another the test case fails

Environment
Appium version : latest version 1.10.0
Mac OS . Mojave 10.14.2
Android device OS:8.1.0 . LG mobile
Details
Am trying to run feature which contains two test case, they are the copy of same. The execution result is pass for 1st testcase but for 2nd its fail

Link to Appium logs
AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Device API level: 27
[ADB] Running ‘/Users/jebran/Library/Android/sdk/platform-tools/adb -P 5037 -s LGM70023758447 shell am start -W -n -S’
[Appium] New AndroidDriver session created successfully, session 0ec912a9-8bc2-4034-b4d4-f90bc5a554c6 added to master session list
[BaseDriver] Event ‘newSessionStarted’ logged at 1548967421637 (20:43:41 GMT+0000 (GMT))
[MJSONWP (0ec912a9)] Cached the protocol value ‘MJSONWP’ for the new session 0ec912a9-8bc2-4034-b4d4-f90bc5a554c6
[MJSONWP (0ec912a9)] Responding to client with driver.createSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“launchTimeout”:90000,“platformName”:“Android”,“platformVersion”:“8.1.0”,“deviceName”:“LGM70023758447”,“app”:"/Users/jebran/Downloads/.apk",“appPackage”:"***",“appActivity”:“md5c94cdddfdaba12205d403d011df87b56.MainActivity”},“launchTimeout”:90000,“platformName”:“Android”,“platformVersion”:“8.1.0”,“deviceName”:“LGM70023758447”,“app”:"/Users/jebran/Downloads/.apk",“appPackage”:"",“appActivity”:“md5c94cdddfdaba12205d403d011df87b56.MainActivity”,“deviceUDID”:“LGM70023758447”,“deviceScreenSize”:“1080x2160”,“deviceModel”:“LG-M700”,“deviceManufacturer”:“LGE”}
[HTTP] <-- POST /wd/hub/session 200 16672 ms - 901
[HTTP]
[HTTP] --> POST /wd/hub/session/0ec912a9-8bc2-4034-b4d4-f90bc5a554c6/timeouts
[HTTP] {“type”:“implicit”,“ms”:30000}
[MJSONWP (0ec912a9)] Calling AppiumDriver.timeouts() with args: [“implicit”,30000,null,null,null,“0ec912a9-8bc2-4034-b4d4-f90bc5a554c6”]
[BaseDriver] MJSONWP timeout arguments: {“type”:“implicit”,“ms”:30000}}
[BaseDriver] Set implicit wait to 30000ms
[MJSONWP (0ec912a9)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/0ec912a9-8bc2-4034-b4d4-f90bc5a554c6/timeouts 200 2 ms - 76
[HTTP]
[HTTP] –>POST /wd/hub/session//element
[HTTP] {“using”:“xpath”,“value”:"//android.widget.TextView[1][@text = ‘Accept’]"}
[HTTP] No route found. Setting content type to ‘text/plain’
[HTTP] <-- POST /wd/hub/session//element 404 2 ms - 66
[HTTP]
[HTTP] --> DELETE /wd/hub/session/0ec912a9-8bc2-4034-b4d4-f90bc5a554c6
[HTTP] {}
[MJSONWP (0ec912a9)] Calling AppiumDriver.deleteSession() with args: [“0ec912a9-8bc2-4034-b4d4-f90bc5a554c6”]