appium+python设置app绝对路径和设置appPackage
设置了“app”以后,就无需再设置appPackage、appActivity
PATH = lambda p: os.path.abspath(os.path.join(os.path.dirname(__file__), p)) desired_caps['app'] = PATH(app_path) # desired_caps['appPackage'] = get_app_package_name() # desired_caps['appActivity'] = get_app_launchable_activity()
设置appPackage、appActivity,就无需设置“app”
# PATH = lambda p: os.path.abspath(os.path.join(os.path.dirname(__file__), p)) # desired_caps['app'] = PATH(app_path) desired_caps['appPackage'] = get_app_package_name() desired_caps['appActivity'] = get_app_launchable_activity()
如果设备中已经安装了应该,可以不设置“app”,直接根据appPackage、appActivity启动应用即可
如果还没安装应该,需要将apk安装到设备中,那么就需要app