Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在Spyner模块中使用nativeClickAt()方法进行Segfault_Python_Qt_Webkit_Spynner - Fatal编程技术网

Python 在Spyner模块中使用nativeClickAt()方法进行Segfault

Python 在Spyner模块中使用nativeClickAt()方法进行Segfault,python,qt,webkit,spynner,Python,Qt,Webkit,Spynner,我不知道如何使用nativeclick()方法单击套利者位置 在报告中,医生说: """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 wai

我不知道如何使用
nativeclick()
方法单击套利者位置

在报告中,医生说:

"""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"""
我已经搜索出什么是
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错误


任何帮助都将不胜感激。

本机单击在很大程度上取决于浏览器的状态及其在触发事件时可能变得不可用的帧,从而导致故障

因为它实际上取决于用例,所以最简单的方法就是进行可重复的测试

尽管如此,我将检查该方法自2.0升级以来的行为是否正确

还要确保有最新的Spyner


此外,要在发生SEGFULTS时跟踪Spyner错误,最好始终将其与gdb或任何调试器一起使用。是的,我过去也有过错误,总是通过更改代码来解决。

我们已经讨论过这个非公开脚本的列表

我们所做的:

  • 您必须有一个ui才能发送原始点击事件:
    browser.show()
  • 当脚本执行时,不能隐藏窗口,否则它将在void->segfault中单击

我们已经讨论了非公开脚本的列表。