2016-12-21 20 views
0

Я запускаю SELENIUM + JAVA тест для Android-приложения с appium в первый раз. (WIndows 8.1) Я скопировал идентификатор кнопки от инспектора Appium. Я пытаюсь нажать кнопку.«Кнопка Tap» дает «Неизвестная ошибка на стороне сервера при обработке команды». в Appium Android test

isDisplayed возвращает истинный или gettext() прекрасно однако loginBtn.tap(1, 1); на кнопку дает следующее сообщение об ошибке

на затмение консоли

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command.

на Appium консоли

info: [debug] Pushing command to appium work queue: ["element:getSize",{"elementId":"2"}] info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:getSize","params":{"elementId":"2"}} info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION info: [debug] [BOOTSTRAP] [debug] Got command action: getSize info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":{"width":540,"height":168}} info: [debug] Pushing command to appium work queue: ["element:touchDown",{"elementId":"2","x":270,"y":1836}] info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:touchDown","params":{"elementId":"2","x":270,"y":1836}} info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION info: [debug] [BOOTSTRAP] [debug] Got command action: touchDown info: [debug] [BOOTSTRAP] [debug] Performing TouchDown using element? true x: 270, y: 1836 info: [debug] [BOOTSTRAP] [error] error while invoking method private boolean com.android.uiautomator.core.InteractionController.touchDown(int,int) on object [email protected] with parameters [270, 1836] null info: [debug] [BOOTSTRAP] [debug] Problem invoking touchDown: java.lang.RuntimeException: error while invoking method private boolean com.android.uiautomator.core.InteractionController.touchDown(int,int) on object [email protected] with parameters [270, 1836] info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"Failed to execute touch event"},"sessionId":"797740b8-3fb1-45ae-b31e-1db9aa3e4513"} info: <-- POST /wd/hub/session/797740b8-3fb1-45ae-b31e-1db9aa3e4513/touch/perform 500 256.730 ms - 198 info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":13,"value":"Failed to execute touch event"} info: --> DELETE /wd/hub/session/797740b8-3fb1-45ae-b31e-1db9aa3e4513 {} info: Shutting down appium session

+0

сделал и удалось получить решительность я также сталкиваются с такой же вопрос –

ответ

0

Я получил это решение:

MobileElement loginBtn=androidDriver.findElementById("com.spotyo.music:id/button_login"); 
if (loginBtn.isDisplayed()){ 
    androidDriver.tap(1, loginBtn, 1);  
} 

 Смежные вопросы

  • Нет связанных вопросов^_^