AirtestProject / Airtest

UI Automation Framework for Games and Apps
http://airtest.netease.com/
Apache License 2.0
8.3k stars 1.31k forks source link

使用Airtest框架编写的PC端python自动化测试脚本无法在Linux系统下执行 #1178

Closed 957Natural closed 11 months ago

957Natural commented 11 months ago

Remove any following parts if does not have details about

Describe the bug 无法在Linux系统下执行,报错提示 root@root:/home/xie/test# airtest run test.py --device "Windows:///?title_re=Skype" --log / save log in '/'

ERROR: setUpClass (airtest.cli.runner.AirtestCase)

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/airtest/cli/runner.py", line 28, in setUpClass setup_by_args(args) File "/usr/local/lib/python3.9/site-packages/airtest/cli/runner.py", line 149, in setup_by_args auto_setup(dirpath, devices, args.log, project_root, compress) File "/usr/local/lib/python3.9/site-packages/airtest/core/api.py", line 141, in auto_setup connect_device(dev) File "/usr/local/lib/python3.9/site-packages/airtest/utils/logwraper.py", line 131, in wrapper res = f(*args, kwargs) File "/usr/local/lib/python3.9/site-packages/airtest/core/api.py", line 74, in connect_device dev = init_device(platform, uuid, params) File "/usr/local/lib/python3.9/site-packages/airtest/core/api.py", line 41, in init_device cls = import_device_cls(platform) File "/usr/local/lib/python3.9/site-packages/airtest/core/helper.py", line 249, in import_device_cls from airtest.core.win.win import Windows as cls File "/usr/local/lib/python3.9/site-packages/airtest/core/win/init.py", line 4, in from .win import Windows File "/usr/local/lib/python3.9/site-packages/airtest/core/win/win.py", line 10, in import win32api ModuleNotFoundError: No module named 'win32api'

paste traceback here

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior 希望让airtest编写的PC端自动化测试脚本可以在Linux系统下执行

Screenshots If applicable, add screenshots to help explain your problem.

python version: python3.9

airtest version: 1.3.1

You can get airtest version via pip freeze command.

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

yimelia commented 11 months ago

pip install win32api