51Testing软件测试论坛
标题:
同时使用pyautogui和pywinauto中Application方法报错,尝试各种办法无法解决,请高...
[打印本页]
作者:
测试积点老人
时间:
2019-9-18 11:09
标题:
同时使用pyautogui和pywinauto中Application方法报错,尝试各种办法无法解决,请高...
代码如下:
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就报错
复制代码
作者:
qqq911
时间:
2019-9-19 10:34
冲突了
作者:
jingzizx
时间:
2019-9-19 12:05
不清楚
作者:
litingting0214
时间:
2019-9-19 13:44
不太清楚
作者:
海海豚
时间:
2019-9-19 15:49
查一下报错信息
作者:
chenjianlin
时间:
2019-9-19 17:04
仔细看查看和自我分析原因,相信你应该没问题
作者:
chenjianlin
时间:
2019-9-19 17:09
兼容性或者程序、软件和环境等之间冲突
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2