Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airtest windows permissions issue #1262

Open
akshaykhandelwal0710 opened this issue Nov 13, 2024 · 0 comments
Open

Airtest windows permissions issue #1262

akshaykhandelwal0710 opened this issue Nov 13, 2024 · 0 comments

Comments

@akshaykhandelwal0710
Copy link

akshaykhandelwal0710 commented Nov 13, 2024

Describe the bug
I get the following error when running airtest python script for a Windows application on a non-admin terminal.

I know that one possible solution is to simply run on an admin terminal. But I wanted to ask if there is any other way to resolve this permissions issue? As the underlying win32api works just fine without admin rights when run independently, it must be possible to get the airtest script also running without admin rights?

Traceback (most recent call last):
  File "C:\Users\itsakshay\Desktop\Airtest Test\ui_test_main.py", line 50, in <module>
    touch(pos)
  File "C:\Users\itsakshay\AppData\Local\Programs\Python\Python310\lib\site-packages\airtest\utils\logwraper.py", line 134, in wrapper
    res = f(*args, **kwargs)
  File "C:\Users\itsakshay\AppData\Local\Programs\Python\Python310\lib\site-packages\airtest\core\api.py", line 373, in touch
    pos = G.DEVICE.touch(pos, **kwargs) or pos
  File "C:\Users\itsakshay\AppData\Local\Programs\Python\Python310\lib\site-packages\airtest\core\win\win.py", line 315, in touch
    self.mouse.move(coords=(end_x, end_y))
  File "C:\Users\itsakshay\AppData\Local\Programs\Python\Python310\lib\site-packages\pywinauto\mouse.py", line 232, in move
    _perform_click_input(button='move',coords=coords,button_down=False,button_up=False)
  File "C:\Users\itsakshay\AppData\Local\Programs\Python\Python310\lib\site-packages\pywinauto\mouse.py", line 125, in _perform_click_input
    win32api.SetCursorPos((coords[0], coords[1]))
pywintypes.error: (0, 'SetCursorPos', 'No error message is available')

python version: python3.10

airtest version: 1.3.5

You can get airtest version via pip freeze command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant