appium启动 install driver安装驱动

appium启动

cpp 复制代码
appium
cpp 复制代码
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启动端口号

cpp 复制代码
appium --port 4724

启动成功

cpp 复制代码
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到电脑

cpp 复制代码
 appium driver install uiautomator2
cpp 复制代码
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将驱动安装到手机

cpp 复制代码
appium setup
cpp 复制代码
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

检查配置是否正确

cpp 复制代码
appium driver doctor uiautomator2
cpp 复制代码
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
相关推荐
大今野17 小时前
windows系统中实现对于appium的依赖搭建
windows·appium
Enougme1 天前
mac安装appuim
macos·appium
山海青风4 天前
使用 OpenAI 提高 Appium 测试脚本效率:从优化到跨平台支持
人工智能·python·appium
_可乐无糖6 天前
iOS UI自动化 Appium的元素定位方式及比较
ios·appium·自动化
镭封9 天前
Appium配置2024.11.12
appium
几何DDDMm9 天前
Python自动化测试---Appium
开发语言·python·appium
qq_4337169510 天前
编写第一个 Appium 测试脚本:从安装到运行!
自动化测试·软件测试·jmeter·ci/cd·职场和发展·appium·jenkins
小码哥说测试13 天前
编写第一个 Appium 测试脚本:从安装到运行!
软件测试·测试工具·职场和发展·单元测试·appium·postman·性能测试
小码哥说测试18 天前
测试分层:减少对全链路回归依赖的探索!
自动化测试·软件测试·人工智能·测试工具·appium·pytest·postman