日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Appium的使用

發布時間:2023/12/10 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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

  • @property (nonatomic, assign, readonly) HTTPConnection *connection; 改為 @property (nonatomic, unsafe_unretained, readonly) HTTPConnection *connection;

    PrivateHeaders/XCTest/XCTestCase.h 中添加

    @property(nonatomic) BOOL shouldSetShouldHaltWhenReceivesControl; // @synthesize shouldSetShouldHaltWhenReceivesControl=_shouldSetShouldHaltWhenReceivesControl;

    WebDriverAgentLib/Utilities/FBFailureProofTestCase.m 中
    issues:13949

    - (void)setUp {[super setUp];self.continueAfterFailure = YES;self.internalImplementation = (_XCTestCaseImplementation *)[FBXCTestCaseImplementationFailureHoldingProxy proxyWithXCTestCaseImplementation:self.internalImplementation]; } 改為 - (void)setUp {[super setUp];self.continueAfterFailure = YES;if ([self respondsToSelector:@selector(internalImplementation)]) {self.internalImplementation = (_XCTestCaseImplementation *)[FBXCTestCaseImplementationFailureHoldingProxy proxyWithXCTestCaseImplementation:self.internalImplementation];} else {self.shouldSetShouldHaltWhenReceivesControl = NO;self.shouldHaltWhenReceivesControl = NO;} }

    command + U

    國內8100端口被封禁,可以轉發端口iproxy 8300 8100

    總結

    以上是生活随笔為你收集整理的Appium的使用的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。