Appium-Get Performance Data(获取性能数据)


Returns the information of the system state which is supported to read as like cpu, memory, network traffic, and battery //返回系统状态的信息,这些状态被支持作为cpu、内存、网络流量和电池等读取

Example Usage
JavaList<List> performanceData = driver.getPerformanceData("my.app.package", "cpuinfo", 5);
Pythonself.driver.get_performance_data('my.app.package', 'cpuinfo', 5)
Javascript// webdriver.io example
driver.getPerformanceData('my.app.package', 'cpuinfo', 5);
// wd example
await driver.getPerformanceData('my.app.package', 'cpuinfo', 5);
Ruby# ruby_lib example
get_performance_data package_name: 'io.appium.android.apis', data_type: 'cpuinfo', data_read_timeout: 10
# ruby_lib_core example
@driver.get_performance_data package_name: 'io.appium.android.apis', data_type:'cpuinfo', data_read_timeout: 10
C#// Not supported
PHP// TODO PHP sample
Support
Appium Server
PlatformDriverPlatform VersionsAppium VersionDriver Version
iOSXCUITestNoneNoneNone
UIAutomationNoneNoneNone
AndroidEspresso?+1.9.0+All
UiAutomator2?+1.6.0+All
UiAutomator4.3+AllAll
MacMacNoneNoneNone
WindowsWindowsNoneNoneNone
Appium Clients
LanguageSupportDocumentation
JavaAllappium.github.io
PythonAllappium.github.io
Javascript (WebdriverIO)All
Javascript (WD)Allgithub.com
RubyAllwww.rubydoc.info
PHPNonegithub.com
C#Nonegithub.com
HTTP API Specifications
Endpoint

POST /session/:session_id/appium/getPerformanceData

URL Parameters
namedescription
session_idID of the session to route the command to
JSON Parameters
nametypedescription
packageNamestringThe package name of the application
dataTypestringThe type of system state which wants to read. It should be one of the supported performance data types
dataReadTimeoutnumberThe number of attempts to read (optional)
Response

The information type of the system state which is supported to read as like cpu, memory, network traffic, and battery (array<string>) //支持读取的系统状态的信息类型,如cpu、内存、网络流量和电池(array)数组形式的字符串

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
### 回答1: appium-python-client安装包可以通过pip命令进行安装,具体步骤如下: 1. 打开命令行工具(如Windows下的cmd或者Linux下的终端),输入以下命令安装pip: ``` sudo apt-get install python-pip ``` 2. 安装appium-python-client,输入以下命令: ``` pip install Appium-Python-Client ``` 3. 等待安装完成即可使用appium-python-client。 ### 回答2: appium-python-client是一个用于进行移动应用测试Python库。它作为Appium测试框架的一个客户端,提供了许多功能和方法来编写和执行测试脚本。 要安装appium-python-client,需要先确保已经安装了Python环境。以下是安装appium-python-client的步骤: 1. 打开终端或命令提示符,并进入到所需的Python项目目录。 2. 使用pip命令安装appium-python-client。在终端或命令提示符中输入以下命令: pip install Appium-Python-Client 在执行命令后,pip会从Python Package Index(PyPI)上下载并安装appium-python-client。 安装完成后,您可以在Python脚本中导入appium-python-client并开始编写测试代码。 例如,您可以使用以下命令导入appium-python-client库: ```python from appium import webdriver ``` 然后,您可以使用appium-python-client提供的方法来启动Appium服务器、初始化移动设备连接、定位元素,并执行各种移动应用测试操作。 总结: appium-python-client是一个用于进行移动应用测试Python库,可以通过pip命令进行安装。安装完成后,您可以在Python脚本中导入该库并使用其提供的方法来编写和执行移动应用测试脚本。 ### 回答3: appium-python-client是一个用于与Appium服务器进行通信的Python库。要安装appium-python-client,您可以按照以下步骤进行操作: 1. 确保您的电脑已经安装了Python解释器。您可以通过在命令行中输入“python --version”来验证Python是否已经安装。 2. 打开命令行或终端,并输入以下命令来安装appium-python-client: ``` pip install Appium-Python-Client ``` 注意:您需要确保您的电脑已经安装了pip,它是一个用于安装Python库的包管理工具。如果您的电脑上没有安装pip,您可以通过以下命令来安装它: ``` python -m ensurepip --upgrade ``` 3. 安装完成后,您可以在Python脚本中导入appium-python-client模块并使用它来与Appium服务器进行通信。例如,您可以使用以下代码示例来连接到Appium服务器: ```python from appium import webdriver desired_caps = { 'platformName': 'Android', 'platformVersion': '9', 'deviceName': 'Android Emulator', 'app': 'path/to/your/app.apk' } driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps) ``` 这将创建一个WebDriver实例,用于控制连接到Appium服务器的设备。您可以使用WebDriver实例来执行各种测试操作,例如查找元素、发送输入等。 通过按照以上步骤安装appium-python-client,您就可以在Python中使用它来创建和执行Appium测试
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Aniona

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值