Appium testing process
Test steps:
Location---> Interaction---> Assertion
Positioning method:
id (important): corresponds to resource-id
accessibility id: corresponds to content-desc (important)
xpath (important)-----------------------------------
Class: Not recommended
Two ways of writing.
findElementByXXX
findElement(by, value) ---Mainly used in PO (page object) mode
Action Support:
click
sendKeys
clear
swipe
touch action
Touch Action:
press
tap
long press
release
wait
moveTo
perform---Finally must use perform to execute
Pycharm Settings
File--->Settings--->Tools--->Python Integrated Tools--->Testing--->Default test runner
Change to pytest or unittest
command line operations
which emulator
View avds
/d/adt-bundle-windows-x86_64-20140702/sdk/tools/emulator -list-avds
start the emulator
/d/adt-bundle-windows-x86_64-20140702/sdk/tools/emulator @Pixel_3_XL_API_24
Start Appium
appium -g /d/learnPY/appautotest/log/appium.log
Appium Desired Capabilities
platformName
deviceName
app
appPackage
appActivity
autoGrantPermissions
caps["unicodeKeyboard"] = "true" You can enter Chinese or other languages