Appium-Android error reporting

No.1 did not understand the meaning of appAcitvity

问题:An unknown server-side error occurred while processing the command

# get device
def get_driver():
    capabilities = {
        "platformName": "Android",
        "deviceName": "3353dc03",
        "app": "test.apk",
        "noReset":True

    }
    drive = webdriver.Remote("http://127.0.0.1:4723/wd/hub", capabilities)
    return drive

Answer: Check the official documentation and find that after setting the current path of "app", you do not need to add the two attributes " appActivity " and " appPackage ". However, Appium will think that your startup activity attribute is .ui.activity.SpalshActivity. For currently popular applications, this attribute is only available when it is installed for the first time, such as entering the navigation page of the application for the first time, and then Restarting the APP property will change to the landing page instead of the navigation page, so you need to continue adding the startup page in the source code

# get device
def get_driver():
    capabilities = {
        "platformName": "Android",
        "deviceName": "3353dc03",
        "app": "test.apk",
        "appActivity": ".ui.activity.LoginActivity",
        "noReset":True

    }
    drive = webdriver.Remote("http://127.0.0.1:4723/wd/hub", capabilities)
    return drive


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324625029&siteId=291194637