当前位置:网站首页>Appium desktop introduction
Appium desktop introduction
2022-06-24 21:06:00 【gchh_ spring】
android Automation premise depends on
1、adb Tools : Dedicated to andriod A tool for automated testing
2、 Simulators or real machines
Simulator : NetEase mumu: For fixed android Version of the simulator , Only support android 6.0 The transformation of the version , If you need to use other Android versions , Can install genimotion and emulator
genimetion,emulator The simulator needs to be installed android studio,studio There is a simulator management tool , You can use this management simulator
Real machine : need root jurisdiction , download root Of apk, Real machine root, Real machine root Poor rear safety
3、appium desktop
appium desktop The main function
1、UI analysis
UI Sorting and analysis , Location and analysis of elements
2、 Record use case
3、 Element lookup and positioning
4、attach Existing session

1 Mark : open inspector Tools
2 Mark : download appium server Log information
3 Mark : close appium server
open inspector The interface behind the tool

Click the hyperlink in the lower left corner , You can open the following link address :https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md
This page mainly introduces Desired Capabilities Property and value information of , Generally, mobile phones are divided into android And apple systems , Next, let's say android Take for example desired Capabilities
platformName: Platform name , The value is mainly :iOS, Android, or FirefoxOS
deviceName: Equipment name , Mobile devices have a unique name to distinguish them , When connecting multiple mobile devices , have access to adb devices Command to view the currently connected device name
If there are more than one , Multiple lists will be displayed
appPackage:only for android,app The name of the package , stay android Unique in the system , Set what needs to be tested app, Can pass adb Command get to
appActivity:only for android,app The name of each page in the , Set what needs to be tested app Which page in , Usually set to app Your home page or welcome page
noReset: The value is true, false,Don't reset app state before this session. Set to true No more data clearing and initialization app, Keep the last run data Information
fullReset: The value is true, false,Perform a complete reset

unicodeKeyBoard: Value :true or false, Whether you need to input a language other than English , If English is required , So set it to true
Enable Unicode input, default false
resetKeyBoard: Value :true or false, Whether the input method needs to be reset after the test is completed
Reset keyboard to its original state, after running Unicode tests with unicodeKeyboard capability. Ignored if used alone. Default false
other Desired Capabilities Property and parameter values of , Please refer to the official documents :
https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md
skipDeviceInitialization:true or false, skip app The initialization , The default is false
dontStopAppOnReset:true or false, Directly execute the operation when the application is started , No need to reboot app
How to get app The package name and activity Page information :
obtain app The package name 、activity
Method 1 :
mac:
adb logcat "ActivityManager:I *:s" | grep "cmp"
win:
adb logcat ActivityManager:I *:s | findstr "cmp"

Mark 1:appPackage
Mark 2:appActivity
Method 2 :
mac:adb logcat |grep -i displayed
win:adb logcat | findstr /i "displayed"
After entering the above command , Open the app, View the latest printed information

Mark 1:appPackage
Mark 2:appActivity
obtain app Information about
Get the current interface element :adb shell dumpsys activity top
Get task list :adb shell dumpsys activity activities
Start the application :
adb shell am start -W -n com.xueqiu.android/.view.WelcomActivityAlias -S
appium desktop establish session、 start-up app

As shown in the figure above , After obtaining all the information, enter the corresponding value , Click on the Start Session, You can start the set app
The first start will be slow , After startup, as shown in the figure below :

Mark 1: Click the refresh button , Refresh inspector Get the simulator page
left : The page display of the current mobile page
middle : Page dom structure , Where the element is located
On the right side : When the element is selected on the left , The details of this element will be displayed on the right , Element attribute information, attribute value, etc

upper : Selected elements , Sliding operation , Click on the action , Return operation , Refresh , Recording , Search element , Copy , close session
appium inspector Simple element positioning
Several common positioning methods :id,accessibility_id
1、driver.find_element_by_id(resource-id), there id Refer to resource-id, As shown in the figure below id Values and resoruce-id Agreement

2、driver.find_element_by_accessibility_id(content-desc), there accessibility_id Refer to content-desc The value of the property
边栏推荐
- Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
- Camera rental management system based on qt+mysql
- Leetcode (146) - LRU cache
- Docker deploy mysql5.7
- The Google File System (GFS) learning notes
- DAPP system customization of full chain hash game (scheme design)
- Use the transparent [x] cross button image in the dialog
- VMware virtual machine setting static IP
- Basic operation of sequence table
- Grating diffraction
猜你喜欢

Learn to use a new technology quickly

The JS method parameter passed a number beginning with 0. A magical problem occurred and bothered me for a long time

Variable setting in postman
![[performance tuning basics] performance tuning strategy](/img/83/be41a6a0c5c186d3fb3a120043c53f.jpg)
[performance tuning basics] performance tuning strategy

Apple, Microsoft and Google will no longer fight each other. They will work together to do a big thing this year

Does the developer want to change to software testing?

Handling of garbled JMeter response data - three solutions

Builder mode -- Master asked me to refine pills

Enjoy yuan mode -- a large number of flying dragons

伯克利、MIT、劍橋、DeepMind等業內大佬線上講座:邁向安全可靠可控的AI
随机推荐
Haitai Advanced Technology | application of privacy computing technology in medical data protection
Pyaudio audio recording
Bytebase joins Alibaba cloud polardb open source database community
2021-09-30
Is the waiting insurance record a waiting insurance evaluation? What is the relationship between the two?
微信小程序中使用vant组件
Summary of idea practical skills: how to rename a project or module to completely solve all the problems you encounter that do not work. It is suggested that the five-star collection be your daughter
How to enhance influence
Reflection - class object function - get method (case)
Intermediary model -- collaboration among departments
Analysis of errors in JSON conversion using objectmapper
Prototype mode -- clone monster Army
The difference between RPC and restful
Packaging_ Conversion between basic type and string type
Rip/ospf protocol notes sorting
Format method and parse method of dateformat class
opds sql组件能不能将流程参数通过上下文传给下一个组件
Open programmable infrastructure (OPI) project, redefining dpu/ipu
JMeter parameterization
Where is 5g really powerful? What is the difference with 4G?