Appium測試過程

測試步驟:
定位--->交互--->斷言windows

定位方法:
id(重要): 對應 resource-id
accessibility id:對應 content-desc(重要)
xpath(重要)-----------------------------------邏輯複雜,比前兩種要慢
class:不推薦app

兩種方式的寫法
findElementByXXX
findElement(by, value) ----主要用於PO(page object)模式ide

動做支持:
click
sendKeys
clear
swipe
touch action測試

手勢操做 TouchAction:
press
tap
long press
release
wait
moveTo
perform---最後必定要使用perform才能執行命令行

Pycharm設置
File--->Settings--->Tools--->Python Integrated Tools--->Testing--->Default test runner
改成pytest或者unittestorm

命令行操做
which emulatorip

查看avds
/d/adt-bundle-windows-x86_64-20140702/sdk/tools/emulator -list-avdsit

啓動模擬器
/d/adt-bundle-windows-x86_64-20140702/sdk/tools/emulator @Pixel_3_XL_API_24io

啓動appium
appium -g /d/learnPY/appautotest/log/appium.logform

相關文章
相關標籤/搜索