TA的每日心情 | 无聊 昨天 09:08 |
---|
签到天数: 531 天 连续签到: 1 天 [LV.9]测试副司令
|
1测试积点
代码如下:
- import pyautogui
- from pywinauto import Application
- pyautogui.moveTo(50,50,duration=0.25)
- 报错信息:
- Traceback (most recent call last):
- File "D:/SVN/AutoTest/test.py", line 4, in <module>
- pyautogui.moveTo(50,50,duration=0.25)
- File "D:\Program Files\Python37\lib\site-packages\pyautogui\__init__.py", line 811, in moveTo
- _failSafeCheck()
- File "D:\Program Files\Python37\lib\site-packages\pyautogui\__init__.py", line 1240, in _failSafeCheck
- if FAILSAFE and tuple(position()) in FAILSAFE_POINTS:
- File "D:\Program Files\Python37\lib\site-packages\pyautogui\__init__.py", line 296, in position
- posx, posy = platformModule._position()
- File "D:\Program Files\Python37\lib\site-packages\pyautogui\_pyautogui_win.py", line 362, in _position
- ctypes.windll.user32.GetCursorPos(ctypes.byref(cursor))
- ctypes.ArgumentError: argument 1: <class 'TypeError'>: expected LP_POINT instance instead of pointer to POINT
- 备注:
- 如果单独使用pyautogui 正常,如下:
- import pyautogui
- pyautogui.moveTo(50,50,duration=0.25)
- 只要引入pywinauto的Application就报错
复制代码
|
|