我不确定如何使用nativeClickAt()
方法单击任意位置。在spynner模块中使用nativeClickAt()方法的段错误
在spynner class,商务部称:
"""Click on an arbitrar location of the browser.
@param where: where to click (QPoint)
@param real: if not true coordinates are relative to the window instead
of the screen
@timeout seconds: seconds to wait after click"""
我已经搜查QT doc要弄清楚什么是QPoint
对象。所以它似乎是x,y坐标。
我试过到目前为止:
import spynner
from PyQt4 import QtCore
browser = spynner.Browser(
embed_jquery = True,
debug_level = spynner.DEBUG
)
(...)
place = QtCore.QPoint(311,443)
print place # PyQt4.QtCore.QPoint(311, 443)
browser.nativeClickAt(place, 3, real=True)
但是当我运行该脚本,我得到一个segfault错误。
任何帮助将非常感激。
我们已经讨论了非公开脚本的列表。 – kiorky