美文网首页iOS开发
Appium使用记录

Appium使用记录

作者: hypercode | 来源:发表于2022-04-29 14:14 被阅读0次

    2022年4月
    0.官网:http://appium.io/

    1.下载desktop:https://github.com/appium/appium-desktop
    2.运行可能出错的解决:

    xattr -cr "/Applications/Appium Server GUI.app"
    codesign --deep --sign - /Applications/Appium\ Server\ GUI.app
    
    Installing on macOS
    If you're using the desktop app on macOS, when you run it you will likely be greeted with some error about the app not being able to be opened, or not verified by Apple, or something similar. The easiest way to get around this is to run xattr -cr on the file you downloaded. So let's say you downloaded Appium-Server-GUI-mac-<version>.dmg and copy Appium Inspector.app in /Applications inside the disk image. Then you would run xattr -cr "/Applications/Appium Server GUI.app" before opening it. The same goes for the zip version (or the .app itself).
    
    The reason for this is that the Appium team does not have a paid Apple developer account and so our app isn't signed by a certificate they recognize, so the OS attempts to prevent it from running. Running the command above gets around this security limitation.
    
    Please try to call codesign --deep --sign - /Applications/Appium\ Server\ GUI.app in case you gets a crash in the app starts.
    

    appuim-doctor --ios也、能检测出来哪些需要安装,警告的一般不用管。

    3.4723端口被占用得解决:

    sudo lsof -i tcp:4723 (sudo lsof -i tcp:port)
    sudo kill -9 something  (sudo kill -9 PID)
    

    4.下载https://github.com/appium/appium-inspector

    5.先启动Appium Server GUI,然后手动启动Appium Inspector,并且启动手机或者模拟器,Appium Inspector参数填好后即可连接上手机App。(Appium Inspector 参数正确的话是可以拉起手机未开启的App的)
    6.连真机的方法:https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md

    7.appium inspector中的capability set值,新版本的appium-inspector填写时需要在key的前面加上appium:

    {
      "appium:platformName": "iOS",
      "appium:platformVersion": "15.0 ",
      "appium:deviceName": "iPhone X",
      "appium:app": "com.xxx.xxx",//这个在文档中是必填,但是删掉后也可以,删掉后是显示当前屏幕信息
      "appium:automationName": "XCUITest",
      "appium:udid": "66f9rejferf9erifj09e6e348763742367486234923",
      "appium: xcodeOrgId": "GYWXXXXX",
      "appium: xcodeSigningId": "iPhone Developer"
    }
    

    相关文章

      网友评论

        本文标题:Appium使用记录

        本文链接:https://www.haomeiwen.com/subject/yevcyrtx.html