遇到adbexecTimeout问题

时间:2019-08-06 13:59:18

标签: android appium robotframework appium-android

在测试本机Web应用程序时,使用Robot Framework Appium库遇到adbexecTimeout问题。测试将持续到登录页面,然后在模拟器中停止。 另外,有什么方法可以在Appium中使用 Run Keyword If 关键字?如果,那么如何?

我尝试将超时时间增加到150000,但是,登陆屏幕后测试仍无法继续。

我尝试导入 SeleniumLibrary 作为 Run Keyword If ,但它与 click元素关键字

冲突
This is the config.robot file

*** Settings ***
Library  AppiumLibrary  run_on_failure=Capture Page Screenshot
Library  String
Resource  ../PageObjects/Chrome.robot

*** Variables ***
${APPIUM_SERVER}  http://127.0.0.1:4723/wd/hub
${ANDROID_PLAT_NAME}  Android
${ANDROID_PLAT_VER}  8.1
${DEVICE_NAME}  emulator-5554
${PACKET_NAME}  com.android.chrome
${ACTIVITY_NAME}  com.google.android.apps.chrome.Main

*** Keywords ***
Begin Web Application Test
    open application  ${APPIUM_SERVER}
    ...  platformName=${ANDROID_PLAT_NAME}
    ...  platformVersion=${ANDROID_PLAT_VER}
    ...  deviceName=${DEVICE_NAME}
    ...  adbExecTimeout=150000
    ...  automationName=Appium
    ...  noReset=false
    ...  appPackage=${PACKET_NAME}
    ...  appActivity=${ACTIVITY_NAME}
    ...  avdLaunchTimeout=150000
    set appium timeout  60s
    sleep  5s
    tap  ${ACCEPT_CONTINUE}
    sleep  5s
    tap  ${NEXT}
    sleep  5s
    tap  ${NO_THANKS}

End Test
    close application
This is my test file  login.robot
*** Settings ***
Resource  ../../Config/input_data.robot
Resource  ../../PageObjects/LoginScreen.robot
Resource  ../../PageObjects/LandingScreen.robot

Suite Setup  Begin Web Application Test
Suite Teardown  End Test

*** Test Cases ***
Successful Login
    go to url  https://www.crediwatch.org
    tap  ${TRANSLATE_CLOSE}
    tap  ${HAMBURGER_ICON}
    tap  ${MY_DASHBOARD}
    input text  ${USERNAME}
    input password  ${PASSWORD}
    tap  ${SIGN_IN}
    wait until page contains  ${SEARCH BAR}

实际结果是: [WARN]连接被'ProtocolError('Connection abort ..'),RemoteDisconnected('Remote end close connection not res res ponse',))':/ wd / hub / session / 546570ad-c81e-433b-b563-bd4034c3ffa3 / screenshot

0 个答案:

没有答案