RF+Appium - Hybrid App - Can't Switch To Context WebView_APP

751 views
Skip to first unread message

Ana Padinha

unread,
Oct 27, 2015, 10:47:00 AM10/27/15
to robotframework-users
Hello guys,
I've been reading a lot and still no answer.

I'm testing an hybrid app in real devices, I'm able to get Contexts : native_app, webview. I'm able to Switch To Context NATIVE_APP but I'm not able to switch to webview.

Why can't I Switch To Context Webview?

Is there any reference for stable version of Appium to get the hybrid apps on real devices working properly or any other ideas/tweaks to get this working ?

I'm using :
robotframework 2.8.7
appium (v1.4.13) installed with node in command line.


Here is my log: info:
(...)
[debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[]}
info: [debug] Condition unmet after 152ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 159.406 ms - 74 {"status":0,"value":[],"sessionId":"4ccd9eab-279
0-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[]}
info: [debug] Condition unmet after 131ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 138.089 ms - 74 {"status":0,"value":[],"sessionId":"4ccd9eab-279
0-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[]}
info: [debug] Condition unmet after 124ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 131.704 ms - 74 {"status":0,"value":[],"sessionId":"4ccd9eab-279
0-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[]}
info: [debug] Condition unmet after 142ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 148.441 ms - 74 {"status":0,"value":[],"sessionId":"4ccd9eab-279
0-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[]}
info: [debug] Condition unmet after 197ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 202.970 ms - 74 {"status":0,"value":[],"sessionId":"4ccd9eab-279
0-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[]}
info: [debug] Condition unmet after 176ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 182.715 ms - 74 {"status":0,"value":[],"sessionId":"4ccd9eab-279
0-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[]}
info: [debug] Condition unmet after 144ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 154.343 ms - 74 {"status":0,"value":[],"sessionId":"4ccd9eab-279
0-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[]}
info: [debug] Condition unmet after 165ms. Timing out.
info: [debug] Responding to client with success: {"status":0,"value":[],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 172.041 ms - 74 {"status":0,"value":[],"sessionId":"4ccd9eab-279
0-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CLASS=android.widget.Button, INSTANCE=6]
info: [debug] [BOOTSTRAP] [debug] getElements selector:UiSelector[CLASS=android.widget.Button, INSTANCE=6]
info: [debug] [BOOTSTRAP] [debug] Selector ends with instance.
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[{"ELEMENT":"1"}]}
info: [debug] Responding to client with success: {"status":0,"value":[{"ELEMENT":"1"}],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 1139.233 ms - 89 {"status":0,"value":[{"ELEMENT":"1"}],"sessionI
d":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements {"using":"xpath","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133",
"value":"//android.widget.Button[@index='39']"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.Button[@index='39']","context":"","m
ultiple":true}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget
.Button[@index='39']","context":"","multiple":true}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.Button[@index='39'] using XPATH with the contextId:  multiple: true
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CLASS=android.widget.Button, INSTANCE=6]
info: [debug] [BOOTSTRAP] [debug] getElements selector:UiSelector[CLASS=android.widget.Button, INSTANCE=6]
info: [debug] [BOOTSTRAP] [debug] Selector ends with instance.
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":[{"ELEMENT":"2"}]}
info: [debug] Responding to client with success: {"status":0,"value":[{"ELEMENT":"2"}],"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/elements 200 169.425 ms - 89 {"status":0,"value":[{"ELEMENT":"2"}],"sessionId
":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/element/2/click {"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133","id":"2"}
info: [debug] Pushing command to appium work queue: ["element:click",{"elementId":"2"}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"2"}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: click
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/element/2/click 200 268.865 ms - 76 {"status":0,"value":true,"sessionId":"4cc
d9eab-2790-4750-a504-10afdfe05133"}
info: --> GET /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/context {}
info: [debug] Responding to client with success: {"status":0,"value":"NATIVE_APP","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- GET /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/context 200 2.121 ms - 84 {"status":0,"value":"NATIVE_APP","sessionId":"4ccd9e
ab-2790-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/context {"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133","name":"NATIVE_AP
P"}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: "C:\Users\Ana Padinha\AppData\Local\Android\sdk\platform-tools\adb.exe" -s 99d22cf0 shell "cat /proc/net/unix"
info: [debug] WEBVIEW_31256 mapped to pid 31256
info: [debug] Getting process name for webview
info: [debug] executing cmd: "C:\Users\Ana Padinha\AppData\Local\Android\sdk\platform-tools\adb.exe" -s 99d22cf0 shell "ps"
info: [debug] Parsed pid: 31256 pkg: com.emn8.mobilem8.nativeapp.bk
info: [debug] from: u0_a280,31256,361,2656104,416388,ffffffff,00000000,R,com.emn8.mobilem8.nativeapp.bk
info: [debug] returning process name: com.emn8.mobilem8.nativeapp.bk
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.xxxxx.xxxx.nativxxx.xx
info: [debug] ["WEBVIEW_com.xxxxx.xxxx.nativxxx.xx"]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.xxxxx.xxxx.nativxxx.xx
info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/context 200 736.600 ms - 76 {"status":0,"value":null,"sessionId":"4ccd9eab-27
90-4750-a504-10afdfe05133"}
info: --> GET /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/context {}
info: [debug] Responding to client with success: {"status":0,"value":"NATIVE_APP","sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133"}
info: <-- GET /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/context 200 4.599 ms - 84 {"status":0,"value":"NATIVE_APP","sessionId":"4ccd9e
ab-2790-4750-a504-10afdfe05133"}
info: --> POST /wd/hub/session/4ccd9eab-2790-4750-a504-10afdfe05133/context {"sessionId":"4ccd9eab-2790-4750-a504-10afdfe05133","name":"WEBVIEW_com.xxxxx.xxxx.nativxxx.xx"}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: "C:\Users\Xxx Xxxxx\AppData\Local\Android\sdk\platform-tools\adb.exe" -s 99d22cf0 shell "cat /proc/net/unix"
info: [debug] WEBVIEW_31256 mapped to pid 31256
info: [debug] Getting process name for webview
info: [debug] executing cmd: "C:\Users\Xxx Xxxxx\AppData\Local\Android\sdk\platform-tools\adb.exe" -s 99d22cf0 shell "ps"
info: [debug] Parsed pid: 31256 pkg: com.xxxxx.xxxx.nativxxx.xx
info: [debug] from: u0_a280,31256,361,2655160,416348,ffffffff,00000000,S,com.xxxxx.xxxx.nativxxx.xx
info: [debug] returning process name: com.xxxxx.xxxx.nativxxx.xx
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.xxxxx.xxxx.nativxxx.xx
info: [debug] ["WEBVIEW_com.xxxxx.xxxx.nativxxx.xx"]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.xxxxx.xxxx.nativxxx.xx
info: [debug] Connecting to chrome-backed webview
info: Chromedriver: Changed state to 'starting'
info: Chromedriver: Set chromedriver binary as: C:\Users\Xxx Xxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\chr
omedriver\win\chromedriver.exe
info: Chromedriver: Killing any old chromedrivers, running: FOR /F "usebackq tokens=5" %a in (`netstat -nao ^| findstr /R /C:"9515 "`) do (FOR /F
 "usebackq" %b in (`TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe`) do (IF NOT %b=="" TASKKILL /F /PID %a))
info: Chromedriver: No old chromedrivers seemed to exist
info: Chromedriver: Spawning chromedriver with: C:\Users\Xxx Xxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\chr
omedriver\win\chromedriver.exe --url-base=wd/hub --port=9515
info: Chromedriver: [STDOUT] Starting ChromeDriver 2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a) on port 9515
Only local connections are allowed.
info: JSONWP Proxy: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
info: JSONWP Proxy: Got response with status 200: {"sessionId":"","status":0,"value":{"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"W
indows NT","version":"6.1 SP1"}}}
info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"
androidPackage":"com.xxxxx.xxxx.nativxxx.xx","androidUseRunningApp":true,"androidDeviceSerial":"99d22cf0"}}}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"3e7a949fe353e600fb8f760519ee5be7","status":13,"value":{"message":"unknown error:
Device 99d22cf0 is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c9...
info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"
androidPackage":"com.xxxxx.xxxx.nativxxx.xx","androidUseRunningApp":true,"androidDeviceSerial":"99d22cf0"}}}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"7833183591f430ce52dd5f6468557c5e","status":13,"value":{"message":"unknown error:
Device 99d22cf0 is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7f

Tatu Aalto

unread,
Oct 27, 2015, 3:00:19 PM10/27/15
to anapa...@gmail.com, robotframework-users
Ugh

There are quite many ways to interact with appium on top of Robot Framework, sharing some details from you setup may help you to get better and quicker response.
1) Would you tell which library, to wrap appium as keywords to Robot Framework, you are using?
2) Which client side you have installed [1], example do you use the Python bindings? Also version information is good to know.
3) Could you share some of the keywords? Can not specify which keywords, because it depends on the which library you are using.
4) How did you setup the driver, what are the desired capabilities you did set? Did you remember to set the automationName as Selendroid?
5) Have you read the appium documentation [2].
6) But because the appium documentation is not good as Robot Framework, looking the tests is also useful [3] and better source of information.
7) Also the Python bindings README [4] is useful, but perhaps not in this situation.

-Tatu
[1] https://github.com/appium/python-client
[2] http://appium.io/slate/en/master/?python#automating-hybrid-apps
[3] https://github.com/appium/python-client/blob/master/test/functional/android/selendroid_tests.py
[4] https://github.com/appium/python-client/blob/master/README.md
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Ana Padinha

unread,
Oct 28, 2015, 11:13:16 AM10/28/15
to robotframework-users

Thanks Tatu!

1) Appium Library.
2) Appium-Python-Client (0.17)
3) The keywords:

***Test Case ***
    Open Application  http://localhost:4723/wd/hub  platformName=Android  platformVersion=5.0.1  deviceName=1111cc111  app=${CURDIR}/demoapp/something.apk
    Sleep    5s
    Get Contexts
    Get Current Context
    Switch To Context    NATIVE_APP
    Get Current Context
    Switch To Context    WEBVIEW_xxx.xxxx.xxxxxx.xxxxxxxxx.xx

4)I used just this capabilities: Open Application  http://localhost:4723/wd/hub  platformName=Android  platformVersion=5.0.1  deviceName=1111cc111  app=${CURDIR}/demoapp/something.apk

5)Yes, I'm testing in 5.0.1 Android should I use selendroid also ? is it possible?
6) and 7) thanks I didn't check this suggestions, one thing.. I need to use Robotframework keywords so python client seems to be tests only in python that its nothing related with robotframework keywords and tests. Could you clarify how can I use Python-Client suggested in the links and robotframework at the same time?

Thanks a lot Tatu, I don't see any other solutions to solve my problem at the moment, any suggestions are welcome.
   

Tatu Aalto

unread,
Oct 29, 2015, 1:14:14 PM10/29/15
to Ana Padinha, robotframework-users

Ugh

I was wrong, with 5. series one does not need use selendroid. Also I don't see any problems with your setup. You could try to upgrade the chrome driver, because 2.18 is somewhat old. Also trying other phone model could give you more details from the problem.

The AppiumLibrary and all other libraries are just code. In many cases it is possible to call the library directly without using the Robot Framework. And certainly you can call Appium python client directly, without Robot Framework. How to use Appium directly, you must read the Appium documentation. That area is not easiest to explain and the Appium documentation already covers that part.

-Tatu
Send from my mobile

Reply all
Reply to author
Forward
0 new messages