Appium 如何打开和关闭应用程序并且仍然记录每个测试用例?(机器人框架/应用程序库)

Appium 如何打开和关闭应用程序并且仍然记录每个测试用例?(机器人框架/应用程序库),appium,robotframework,Appium,Robotframework,我正在尝试用AppiumLibrary设置一个机器人框架自动化。我想在每个测试用例中关闭应用程序并再次打开它,但不需要再次登录。实际上,当我关闭应用程序时,应用程序会重置并要求我再次登录。我只是将“noReset=true”功能放在开放应用程序上,但这并不能解决我的问题。有人知道怎么做吗 ***Settings*** Library AppiumLibrary ***Keywords*** Start Session Set Appium Timeout 10 Ope

我正在尝试用AppiumLibrary设置一个机器人框架自动化。我想在每个测试用例中关闭应用程序并再次打开它,但不需要再次登录。实际上,当我关闭应用程序时,应用程序会重置并要求我再次登录。我只是将“noReset=true”功能放在开放应用程序上,但这并不能解决我的问题。有人知道怎么做吗

***Settings***
Library     AppiumLibrary

***Keywords***
Start Session
    Set Appium Timeout  10
    Open Application    http://localhost:4723/wd/hub
    ...                 automationName=UiAutomator2
    ...                 platformName=Android
    ...                 deviceName=emulator-5554
    ...                 appPackage=br.com.app.app
    ...                 appActivity=.MainActivity
    ...                 autoGrantPermissions=true
    ...                 noReset=true
    Sleep               5

Start app
    Wait Until Page Contains               Hello

Close Session
    Capture Page Screenshot
    Close Application                      noReset=true

Close Application
    Capture Page Screenshot
    Quit Application   

Launch Application
    Open Application                     http://localhost:4723/wd/hub
    ...                                  automationName=UiAutomator2
    ...                                  platformName=Android
    ...                                  deviceName=emulator-5554
    ...                                  appPackage=br.com.app.app
    ...                                  appActivity=.MainActivity
    ...                                  autoGrantPermissions=true
    ...                                  noReset=true

***Test Cases***
See the first screen
    [Setup]          Start Session
    Start app
    Log in
    Check the first screen
    [Teardown]       Close Application

See the second screen
    [Setup]          Launch Application
    Check the first screen
    [Teardown]       Close Session

尝试在功能中同时使用fullReset=false和noReset=true。这可以解决你的问题