I am having problem with webview(context) when I try to switch to webview(context) in following sequence
1 switch to webview(context).
2 switches to native_app view(context).
3 again switch to webview(context) - now Appium get hangs up.
I am facing problem on Android SDK version 5.0.2.
Can you guide me a way to solve this issue out?
I think I fixed this recently, can you update to the latest version of appium? Or perhaps build from master?
The same problem exists in 1.4.1 and even new problem of session getting expire starts after running few testcases.
Even I started facing this issue on 1.4.1 âŚ
Earlier on 1.3.5 it was working fine for me.
Raised an issue @ https://github.com/appium/appium/issues/5230
Thanks,
Ramdas
Hi,
I am also facing same issue â
While switching to WebView getting below log in Appium
info: [debug] from: u0_a258,6245,150,707180,86156,ffffffff,00000000,R,com.veloziti.salesforce
info: [debug] returning process name: com.veloziti.salesforce
info: [debug] Available contexts:
info: [debug] [âWEBVIEW_com.veloziti.salesforceâ]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.veloziti.salesforce
info: [debug] Responding to client with success: {âstatusâ:0,âvalueâ:[âNATIVE_APPâ,âWEBVIEW_com.veloziti.salesforceâ],âsessionIdâ:â50918f8c-f0be-4007-a64e-e0c2ba5c6783â}
info: <-- GET /wd/hub/session/50918f8c-f0be-4007-a64e-e0c2ba5c6783/contexts 200 171.415 ms - 120 {âstatusâ:0,âvalueâ:[âNATIVE_APPâ,âWEBVIEW_com.veloziti.salesforceâ],âsessionIdâ:â50918f8c-f0be-4007-a64e-e0c2ba5c6783â}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {âstatusâ:0,âvalueâ:{âbuildâ:{âversionâ:â1.4.1â,ârevisionâ:âce6220829063679bcccf5724515c29569c4a16d9â}},âsessionIdâ:â50918f8c-f0be-4007-a64e-e0c2ba5c6783â}
info: <-- GET /wd/hub/status 200 1.979 ms - 155 {âstatusâ:0,âvalueâ:{âbuildâ:{âversionâ:â1.4.1â,ârevisionâ:âce6220829063679bcccf5724515c29569c4a16d9â}},âsessionIdâ:â50918f8c-f0be-4007-a64e-e0c2ba5c6783â}
info: --> POST /wd/hub/session/50918f8c-f0be-4007-a64e-e0c2ba5c6783/context {ânameâ:âWEBVIEW_com.veloziti.salesforceâ}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: /Applications/ADT/sdk/platform-tools/adb -s P7BILB7P9LIFSWMB shell âcat /proc/net/unixâ
info: [debug] WEBVIEW_6245 mapped to pid 6245
info: [debug] Getting process name for webview
info: [debug] executing cmd: /Applications/ADT/sdk/platform-tools/adb -s P7BILB7P9LIFSWMB shell âpsâ
info: [debug] Parsed pid: 6245 pkg: com.veloziti.salesforce
info: [debug] from: u0_a258,6245,150,707180,87672,ffffffff,00000000,R,com.veloziti.salesforce
info: [debug] returning process name: com.veloziti.salesforce
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.veloziti.salesforce
info: [debug] [âWEBVIEW_com.veloziti.salesforceâ]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.veloziti.salesforce
info: [debug] Connecting to chrome-backed webview
info: Set chromedriver binary as: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver
info: Killing any old chromedrivers, running: ps -ef | grep /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver | grep -v grep |grep -e ââport=9515(\s.*)?$â | awk â{ print $2 }â | xargs kill -15
info: Successfully cleaned up old chromedrivers
info: Spawning chromedriver with: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver --url-base=wd/hub --port=9515
info: [CHROMEDRIVER STDOUT] Starting ChromeDriver 2.15.322455 (ae8db840dac8d0c453355d3d922c91adfb61df8f) on port 9515
Only local connections are allowed.
info: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
info: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
info: Got response with status 200: {âsessionIdâ:"",âstatusâ:0,âvalueâ:{âbuildâ:{âversionâ:âalphaâ},âosâ:{âarchâ:âx86_64â,ânameâ:âMac OS Xâ,âversionâ:â10.10.1â}}}
info: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {âdesiredCapabilitiesâ:{âchromeOptionsâ:{âandroidPackageâ:âcom.veloziti.salesforceâ,âandroidUseRunningAppâ:true,âandroidDeviceSerialâ:âP7BILB7P9LIFSWMBâ}}}
info: Got response with status 200: {âsessionIdâ:âfeaea0e8ec4c82ca26138b80298fcc6câ,âstatusâ:0,âvalueâ:{âacceptSslCertsâ:true,âapplicationCacheEnabledâ:false,âbrowserConnectionEnabledâ:false,âbrowserNameâ:âchromeâ,âchromeâ:{},"cssSelectâŚ
info: [debug] Responding to client with success: {âstatusâ:0,âvalueâ:null,âsessionIdâ:â50918f8c-f0be-4007-a64e-e0c2ba5c6783â}
info: <-- POST /wd/hub/session/50918f8c-f0be-4007-a64e-e0c2ba5c6783/context 200 2252.138 ms - 76 {âstatusâ:0,âvalueâ:null,âsessionIdâ:â50918f8c-f0be-4007-a64e-e0c2ba5c6783â}
info: --> POST /wd/hub/session/50918f8c-f0be-4007-a64e-e0c2ba5c6783/element {âusingâ:âxpathâ,âvalueâ:"//button[@id=âmenuButtonâ]"}
info: Proxying [POST /wd/hub/session/50918f8c-f0be-4007-a64e-e0c2ba5c6783/element] to [POST http://127.0.0.1:9515/wd/hub/session/feaea0e8ec4c82ca26138b80298fcc6c/element] with body: {âusingâ:âxpathâ,âvalueâ:"//button[@id=âmenuButtonâ]"}
info: Got response with status 200: {âsessionIdâ:âfeaea0e8ec4c82ca26138b80298fcc6câ,âstatusâ:7,âvalueâ:{âmessageâ:"no such element\n (Session info: webview=)\n (Driver info: chromedriver=2.15.322455 (ae8db840dac8d0c453355d3d922c91adfbâŚ
info: <-- POST /wd/hub/session/50918f8c-f0be-4007-a64e-e0c2ba5c6783/element 200 255.302 ms - 244
info: --> GET /wd/hub/status {}
error: Got bad session base with rest of url: /status
info: <-- GET /wd/hub/status - - ms - -
info: --> GET /wd/hub/status {}
error: Got bad session base with rest of url: /status
info: <-- GET /wd/hub/status - - ms - -
info: --> GET /wd/hub/status {}
error: Got bad session base with rest of url: /status
info: <-- GET /wd/hub/status - - ms - -
undefined
info: --> GET /wd/hub/status {}
error: Got bad session base with rest of url: /status
@Jimit24365 please clarify which appium capabilities did you use for launching both appium and webview ?