zoukankan      html  css  js  c++  java
  • Appium命令-Devices

                                                                          Acitvity

    Start Activity

    通过提供包名和Activity名来启动一个Android Activity

    # Python
    self.driver.start_activity("com.example", "ActivityName");

    获取当前的Activity名称

    得到当前的Android Activity名称

    # Python
    activity = self.driver.current_activity;

    获取当前的包名

    得到当前的Android应用的包名

    package = self.driver.current_package;

                                                                                      APP

    安装应用

    将给定的应用安装到设备上

    self.driver.install_app('/Users/johndoe/path/to/app.apk');

    是否已安装应用程序

    检查设备上是否安装了指定的应用程序

    self.driver.is_app_installed('com.example.AppName');

    启动应用

    在设备上启动被测应用

    self.driver.launch_app()

    Background App

    Send the currently running app for this session to the background

    self.driver.background_app(10)

    Close an App

    self.driver.close_app()

    重置应用

    self.driver.reset()

    删除应用

    self.driver.remove_app('com.example.AppName');

    Activate App

    Activate the given app onto the device

    driver.activate_app('com.apple.Preferences')
    driver.activate_app('io.appium.android.apis')

    Terminate App

    driver.terminate_app('com.apple.Preferences')
    driver.terminate_app('io.appium.android.apis')

    获取应用状态

    获取设备上给定的应用程序状态

    driver.query_app_state('com.apple.Preferences')
    driver.query_app_state('io.appium.android.apis')
     
  • 相关阅读:
    Anaconda使用命令
    排序算法3--插入排序--希尔排序(缩小增量排序)
    排序算法2--插入排序--折半插入排序
    排序算法1--插入排序--直接插入排序
    排序总结---常用的排序算法总结,java和js实现
    前端兼容性问题
    js对象的几种创建方式和js实现继承的方式[转]
    js原型和原型链[转]
    性能优化的方法
    Http状态码
  • 原文地址:https://www.cnblogs.com/muxs/p/15163338.html
Copyright © 2011-2022 走看看