使用 Sikuli 进行拖放
我在使用 Sikuli 拖放时遇到问题。我想在任何其他方向(上、下、左、右)拖动某些东西固定数量的像素。
这看起来应该可以工作:
t = find("1325249963143.png")
dragDrop(t, [t.x + 100, t.y + 100])
Sikuli IDE 日志显示
[log] DRAG (741,525) to null
,但该元素未被拖动。
这工作得很好:
dragDrop("1325249963143.png", "1325251471990.png")
日志显示
[log] DRAG (741,525) to (507,490)
我做错了什么?
环境:Mac OS X 10.7.2、Sikuli X-1.0rc3 (r905)
I am having trouble using drag and drop with Sikuli. I would like to drag something in any other direction (up, down, left, right) for a fixed number of pixels.
This looks like it should work:
t = find("1325249963143.png")
dragDrop(t, [t.x + 100, t.y + 100])
Sikuli IDE log says
[log] DRAG (741,525) to null
but the element is not dragged.
This works just fine:
dragDrop("1325249963143.png", "1325251471990.png")
The log says
[log] DRAG (741,525) to (507,490)
What am I doing wrong?
Environment: Mac OS X 10.7.2, Sikuli X-1.0rc3 (r905)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只是在这里打个招呼 - 另一种编码:
only to say hello here - an alternative coding:
要引用 RaiMan (raimund-hocke):
To quote RaiMan (raimund-hocke):
我使用此代码将图像拖动到给定位置:
I use this code to drag an image down to a given location: