I’d like to run Appium tests on a Crosswalk-Cordova application using cucumber with appium 1.3.5 version.But i am not able to switch to WEBVIEW context. Its returning only NATIVE_APP context. So I could not run the test.Can any one tell me, appium support Cross walk ?
I am currently working on a Cordova app and able to use Appium for automating it, verify from your developers that WebView is exposed for your app
Thanks,
Sujata
Thanks for your reply. Now i could switch over to WEBVIEW by setting ‘automationName = selendroid’ .But issue, i am getting error when i use @driver.find_element(:class_name,‘x-button-back’).click
See the below logs.
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: /Applications/AndroidSdk/sdk/platform-tools/adb -s ZX1D63H5LP shell “cat /proc/net/unix”
info: [debug] WEBVIEW_2725 mapped to pid 2725
info: [debug] Getting process name for webview
info: [debug] executing cmd: /Applications/AndroidSdk/sdk/platform-tools/adb -s ZX1D63H5LP shell “ps”
info: [debug] Parsed pid: 2725 pkg: com.example.sample
info: [debug] from: u0_a311,2725,326,1146180,68380,ffffffff,00000000,S,com.example.sample
info: [debug] returning process name: com.example.sample
info: [debug] Available contexts: undefined
info: [debug] [“WEBVIEW_com.example.sample”]
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/window_handles",“method”:"GET”}
info: [debug] Available contexts: [“WEBVIEW_0”,“NATIVE_APP”]
info: [debug] Responding to client with success: {“status”:0,“value”:[“WEBVIEW_0”,“NATIVE_APP”],“sessionId”:“8c220843-f667-f11e-f570-88f32b5ff8f2”}
info: <-- GET /wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/contexts 200 136.910 ms - 98 {“status”:0,“value”:[“WEBVIEW_0”,“NATIVE_APP”],“sessionId”:“8c220843-f667-f11e-f570-88f32b5ff8f2”}
info: --> POST /wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/context {“name”:“WEBVIEW_0”}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: /Applications/AndroidSdk/sdk/platform-tools/adb -s ZX1D63H5LP shell “cat /proc/net/unix”
info: [debug] WEBVIEW_2725 mapped to pid 2725
info: [debug] Getting process name for webview
info: [debug] executing cmd: /Applications/AndroidSdk/sdk/platform-tools/adb -s ZX1D63H5LP shell “ps”
info: [debug] Parsed pid: 2725 pkg: com.example.sample
info: [debug] from: u0_a311,2725,326,1144376,66440,ffffffff,00000000,S,com.example.sample
info: [debug] returning process name: com.example.sample
info: [debug] Available contexts: WEBVIEW_0,NATIVE_APP
info: [debug] [“WEBVIEW_com.example.sample”]
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/window_handles",“method”:"GET”}
info: [debug] Available contexts: [“WEBVIEW_0”,“NATIVE_APP”]
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/context",“method”:“POST”,“json”:{“name”:"WEBVIEW_0”}}
info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessionId”:“8c220843-f667-f11e-f570-88f32b5ff8f2”}
info: <-- POST /wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/context 200 206.674 ms - 76 {“status”:0,“value”:null,“sessionId”:“8c220843-f667-f11e-f570-88f32b5ff8f2”}
info: --> POST /wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/element {“using”:“class name”,“value”:“x-button-back”}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/element",“method”:“POST”,“json”:{“using”:"class name”,“value”:“x-button-back”}}
info: [debug] [SELENDROID] -1
info: [debug] [SELENDROID] -1
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command.”,“origValue”:“Did not successfully proxy server command”},“sessionId”:“8c220843-f667-f11e-f570-88f32b5ff8f2”}
info: <-- POST /wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2/element 500 212.396 ms - 210
info: --> DELETE /wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2 {}
info: Shutting down appium session
info: [debug] Stopping selendroid server
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2",“method”:"DELETE”}
info: [debug] Cleaning up appium session
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command. (Original error: socket hang up)”,“code”:“ECONNRESET”,“origValue”:“socket hang up”},“sessionId”:null}
info: <-- DELETE /wd/hub/session/8c220843-f667-f11e-f570-88f32b5ff8f2 500 5.685 ms - 202
Already I tried with that. with this i am not getting the Webview context. Only Native_app is returning.
info: [debug] Available contexts: NATIVE_APP
If your app is using crosswalk it is probably using a chrome web view and not a android web view. From my experience the chromedriver (which is used by appium) is currently not able to handle chrome web views properly on android. Details can be found here:
If you are on linux with 64 bit i can share my self compiled chromedriver binary.
Hi guys , any news ? is there a way to automate crosswalk apks ?