Appium的使用
Appium的使用
about-appium
Appium-desktop 1.22分成了appium-desktop與appium-inspector
appium-desktop
desktop直接點擊start即可
appium-inspector
注意的是Remote Path需要填寫/wd/hub.
然后直接點擊StartSession即可.(缺少什么會有報錯提醒).
{"platformName": "iOS","appium:bundleId": "待測試的bundleId","appium:automationName": "XCUITest","appium:deviceName": "iPhone 13 Pro Max","appium:udid": "設備udid" }如果未填寫udid,點擊start會開啟一個Simulator.填寫了真機的udid則會開啟真機上對應bundleId的項目/或者報錯.
Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 " The folder “WebDriverAgentRunner_iphoneos15.2-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/Users/xxx/Library/Developer/Xcode/DerivedData/WebDriverAgent-aghlrsejdreqngftgvcqwnjgrbou/Build/Products/WebDriverAgentRunner_iphoneos15.2-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x600002fa9020 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} ** TEST BUILD FAILED **這是因為WebDriverAgent太老了
git clone https://github.com/facebook/WebDriverAgentmkdir -p Resources/WebDriverAgent.bundle下載下來之后將Scripts路徑下的bootstrap.sh文件中大概70行的`npm install`命令改為`npm i --legacy-peer-deps`.sh ./Scripts/bootstrap.sh修改BundleID
修改TARGETS->Build Setting->All || Combined->Validate Workspace->YES.
WebDriverAgent(Target)->Frameworks->iOS->RoutingHTTPServer
PrivateHeaders/XCTest/XCTestCase.h 中添加
@property(nonatomic) BOOL shouldSetShouldHaltWhenReceivesControl; // @synthesize shouldSetShouldHaltWhenReceivesControl=_shouldSetShouldHaltWhenReceivesControl;WebDriverAgentLib/Utilities/FBFailureProofTestCase.m 中
issues:13949
command + U
國內8100端口被封禁,可以轉發端口iproxy 8300 8100
總結
- 上一篇: LDAP入门
- 下一篇: mysql教程详解之多表联合查询,MYS