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')
     
  • 相关阅读:
    6.etc目录下重要文件和目录详解
    5.linux目录结构介绍
    4.CRT远程连接的使用
    3.了解linux系统以及搭建学习环境
    记录groupby的一次操作
    keras 文本序列的相关api
    networkX.core_number(graph)
    关于无向图的最大团的问题。
    数据分析,numpy pandas常用api记录
    conda install 失败 http404
  • 原文地址:https://www.cnblogs.com/muxs/p/15163338.html
Copyright © 2011-2022 走看看