当前位置: 首页 > article >正文

appium启动 install driver安装驱动

appium启动

appium
PS C:\Windows\system32> appium
[Appium] Welcome to Appium v2.12.1
[Appium] The autodetected Appium home path: C:\Users\liyd\.appium
[HTTP] Could not start REST http interface listener. The requested port may already be in use. Please make sure there is no other instance of this server running already.
[Appium] Could not configure Appium server. It's possible that a driver or plugin tried to update the server and failed. Original error: listen EADDRINUSE: address already in use 0.0.0.0:4723
[Appium] Error: listen EADDRINUSE: address already in use 0.0.0.0:4723
    at Server.setupListenHandle [as _listen2] (node:net:1751:16)
    at listenInCluster (node:net:1799:12)
    at doListen (node:net:1948:7)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
PS C:\Windows\system32>

此时,见端口已经被占用,需要指定appium启动端口号

appium --port 4724

启动成功

PS C:\Windows\system32> appium --port 4724
[Appium] Welcome to Appium v2.12.1
[Appium] Non-default server args:
[Appium] {
  port: 4724
}
[Appium] The autodetected Appium home path: C:\Users\liyd\.appium
[Appium] Attempting to load driver uiautomator2...
[Appium] Requiring driver at C:\Users\liyd\.appium\node_modules\appium-uiautomator2-driver\build\index.js
[Appium] AndroidUiautomator2Driver has been successfully loaded in 0.626s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4724
[Appium] You can provide the following URLs in your client code to connect to this server:
        http://192.168.17.76:4724/
        http://192.168.42.60:4724/
        http://127.0.0.1:4724/ (only accessible from the same host)
        http://172.28.224.1:4724/
[Appium] Available drivers:
[Appium]   - uiautomator2@3.8.1 (automationName 'UiAutomator2')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.

appium安装driver到电脑

 appium driver install uiautomator2
PS C:\Windows\system32> appium driver install uiautomator2
√ Checking if 'appium-uiautomator2-driver' is compatible
√ Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver'
i Driver uiautomator2@3.8.1 successfully installed
- automationName: UiAutomator2
- platformNames: ["Android"]

appium将驱动安装到手机

appium setup
PS C:\Windows\system32> appium setup
info Appium uiautomator2 (3.8.1) is already installed. Skipping the installation.
√ Checking if 'appium-espresso-driver' is compatible
√ Installing 'espresso' using NPM install spec 'appium-espresso-driver'
i Driver espresso@3.5.0 successfully installed
- automationName: Espresso
- platformNames: ["Android"]
√ Checking if '@appium/images-plugin' is compatible
√ Installing 'images' using NPM install spec '@appium/images-plugin'
i Plugin images@3.0.21 successfully installed

检查配置是否正确

appium driver doctor uiautomator2
PS C:\Users\liyd> appium driver doctor uiautomator2
Running 7 doctor checks for the "uiautomator2" driver
info Doctor ### Starting doctor diagnostics  ###
info Doctor  ✔ ANDROID_HOME is set to: E:\sdk
info Doctor    Checking adb, emulator, apkanalyzer.bat
info Doctor      'adb' exists in E:\sdk\platform-tools\adb.exe
info Doctor      'emulator' exists in E:\sdk\emulator\emulator.exe
info Doctor      'apkanalyzer.bat' exists in E:\sdk\cmdline-tools\latest\bin\apkanalyzer.bat
info Doctor  ✔ adb, emulator, apkanalyzer.bat exist in 'E:\sdk'
info Doctor  ✔ JAVA_HOME is set to: C:\Users\liyd\.jdks\corretto-11.0.21
info Doctor  ✔ 'bin\java.exe' exists under 'C:\Users\liyd\.jdks\corretto-11.0.21'
WARN Doctor  ✖ bundletool.jar cannot be found
WARN Doctor  ✖ ffmpeg.exe cannot be found
WARN Doctor  ✖ gst-launch-1.0.exe and/or gst-inspect-1.0.exe cannot be found
info Doctor ### Diagnostic completed, 0 required fixes needed, 3 optional fixes possible. ###
info Doctor
info Doctor ### Optional Manual Fixes ###
info Doctor To fix these optional issues, please do the following manually:
WARN Doctor  ➜ bundletool.jar is used to handle Android App bundles. Please download the binary from https://github.com/google/bundletool/releases/ and store it to any folder listed in the PATH environment variable. Folders that are currently present in PATH: C:\Users\liyd\.jdks\corretto-11.0.21\bin;C:\Users\liyd\.jdks\corretto-11.0.21\jre\bin;C:\Python312\Scripts\;C:\Python312\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin;C:\Program Files\Git;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\dotnet\;C:\Users\liyd\Desktop\1\dex2jar-2.0\dex2jar-2.0C:\Program Files\nodejs;E:\apktool;E:\software\ant\apache-ant-1.9.16\bin;E:\work\tkbackground\jjchannelpackage\ToolConfigPath\tools\gradle\gradle-6.1.1\jre\bin;E:\software\ant\apache-ant-1.9.16\lib;C:\Windows\System32\OpenSSH\;E:\work\tkbackground\jjchannelpackage\ToolConfigPath\tools\gradle\gradle-6.1.1\bin;C:\Users\liyd\.gradle;E:\sdk\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin;E:\sdk\platform-tools;C:\Program Files\WinRAR;E:\sdk\build-tools\30.0.0;E:\software\dex2jar-2.0;C:\Program Files\apache-maven-3.8.8-bin\apache-maven-3.8.8\bin;C:\Program Files\Git\cmd;C:\Program Files\Huawei\DevEco Studio\sdk\default\openharmony\toolchains;C:\Users\liyd\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\liyd\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\liyd\AppData\Local\Programs\Python\Python38\;C:\Users\liyd\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\WebStorm 2023.2.5\bin;;C:\Program Files\JetBrains\PyCharm 2023.2.5\bin;;C:\Users\liyd\AppData\Roaming\npm;C:\Program Files\Huawei\DevEco Studio\bin;;C:\Users\liyd\AppData\Roaming\nvm;C:\Program Files\nodejs
WARN Doctor  ➜ ffmpeg.exe is used to capture screen recordings from the device under test. Please read https://www.ffmpeg.org/download.html.
WARN Doctor  ➜ gst-launch-1.0.exe and gst-inspect-1.0.exe are used to stream the screen of the device under test. Please read https://gstreamer.freedesktop.org/documentation/installing/index.html?gi-language=c.
info Doctor
info Doctor Bye! All issues have been fixed!
info Doctor

http://www.kler.cn/a/386282.html

相关文章:

  • FBX福币交易所恒指收跌1.96% 半导体股继续回调
  • MySQL查询某个数据库中特定表的空间占用大小
  • C# WPF FontDialog字体对话框,ColorDialog颜色对话框 引用
  • Python高级编程模式和设计模式
  • Docker compose部署portainer
  • 传奇996_21——龙岭事件
  • 前端入门一之JS对象、字符串对象、数组对象、Data()对象等
  • HTML CSS H5C3样式语句汇总20241105
  • SpringBoot健身房管理系统:敏捷开发实践
  • HTML 鼠标滑动 页面的header背景从透明色变为黑色
  • GitLab基于Drone搭建持续集成(CI/CD)
  • Vue前端开发:animate.css第三方动画库
  • TOSHIBA 74VHC00FT COMS汽车、工业企业的选择
  • windows terminal下载安装并替换vscode默认终端
  • 【Javascript】-一些原生的网页设计案例
  • 【LeetCode】【算法】48. 旋转图像
  • [Qt] 信号与槽:深入浅出跨UI与跨线程的信号发送
  • 创建者模式之【建造者模式】
  • 用 Python 从零开始创建神经网络(三)
  • 线程安全的单例模式
  • 小程序开发进阶之路: 重新认识产品经理
  • 嵌入式新手必读好文,常见传感器类型中,LM393的作用,及模块原理(看不懂来问我)!!!
  • 【Linux】工具和软件
  • 前端必知必会-JavaScript数组方法(上)
  • GitHub中搜索项目方法
  • 【学习笔记】Kylin-Desktop-V10-SP1 麒麟系统知识5——网络设置