当前位置:网站首页>Detailed explanation of equipment interaction API for dry goods 𞓜 app automated testing
Detailed explanation of equipment interaction API for dry goods 𞓜 app automated testing
2022-06-10 01:49:00 【Hua Weiyun】
Appium Provides a lot of system operation , In the test APP There will be some special scenes in the process , Like a phone call 、 SMS , Horizontal and vertical screen switching , install / uninstall APP, Keyboard operation on mobile phone , Screen recording and other functions . Here are some common device interactions API.
See the official website for more usage :
http://appium.io/docs/en/about-appium/intro/
Analog phone / SMS
Use the following command to simulate GSM Phone calls and text messages , Be careful : Can only be used on simulators !
self.driver.make_gsm_call("5551234567", GsmCallActions.CALL);self.driver.send_sms('555-123-4567', 'Hey lol')App operation
# Realization APP Installation self.driver.install_app('/Users/johndoe/path/to/app.apk') # testing APP Is it installed self.driver.is_app_installed('com.example.AppName');# start-up APPself.driver.launch_app()weditor Installation mode
Keyboard events can be referenced Android Official website :
https://developer.android.com/reference/android/view/KeyEvent.html
The keys are shown below 、 Long press 、 Hidden keyboard 、 Whether the soft keyboard displays , The code is as follows :
self.driver.press_keycode(10)self.driver.long_press_keycode(10)self.driver.hide_keyboard()self.driver.is_keyboard_shown()Set the contents of the system clipboard :
self.driver.set_clipboard('happy testing')self.driver.set_clipboard_text('happy testing')Get the contents of the clipboard :
self.driver.get_clipboard()self.driver.get_clipboard_text()Device interaction API Let's start with this , If you want to learn about other device interactions API Or other knowledge points , You can leave a message below !
边栏推荐
- [email protected] 项目实训
- Solution to the problem of the greatest common divisor and the least common multiple of Luogu p1029
- Associative array & regular expression
- Organic metal porous material MOF (FE) contains camptothecin, and gambogic acid and indocyanine green | rmof-3 contain paclitaxel
- 【LeetCode】287. Find duplicates
- [email protected] -808 and [email protected] -223 introduction
- Domain Adaptation and Graph Neural Networks
- 物联网工程设计与实施
- [program life] "stage summary" - at a loss
- Innftnews | l'avenir de NFT dans l'économie web3
猜你喜欢

Various utilization forms of map tile data and browsing display of tile data

【FPGA】day17-单总线协议ds18b20简介
[email protected] 项目实训"/>[email protected] 项目实训

Introduction à la définition et au calcul de la variance Allan

Rhcsa day 7
![[Multisim Simulation] differential proportional amplifier circuit](/img/29/951bee086128c1a0a4ec33ddc82bee.png)
[Multisim Simulation] differential proportional amplifier circuit

Use the fiddler breakpoint to modify the request parameters and return parameters of an interface, intercept requests, and modify requests and responses

What if win11 returns win10 without a return option?

How can I right-click win11 to open all options directly?

【ICLR 2022】Towards Continual Knowledge Learning of Language Models
随机推荐
【FPGA】day15-串口协议uart回环工程
From these papers in 2022, we can see the trend of recommended system sequence modeling
[email protected]和[email protected]装载5-Fu(5-氟尿
Record the process of finding the application stuck bug caused by improper use of redis
【LeetCode】114. Expand binary tree into linked list
When the MySQL service is started during initialization, it shows that net is neither an internal or external command nor a runnable program. How to solve this problem? This is the same as net Exe mis
Software engineering final review
【LeetCode】114. 二叉树展开为链表
How the computer system modifies the picture format
ZMQ communication
Thingsboard tutorial (18): overview of TB rule engine
物联网工程设计与实施
Various utilization forms of map tile data and browsing display of tile data
【LeetCode】437.路径总和III
Associative array & regular expression
Eight consecutive championships! Inspur cloud has been the first in China's Government cloud market for 8 consecutive years
Which of DV and ov SSL certificates is suitable for purchase on the company's website
1265_ Implementation analysis of adding tasks to task ready linked list in FreeRTOS
[no title] 416 Split equal sum subset
Allan方差定義與計算方法簡介