我一直在使用空手道框架机器人组件进行桌面UI自动化。有了它,我需要单击数据网格的每个行中的一个按钮,然后使用 consck()
在不在视图/不在屏幕上时不起作用。因此,我试图弄清楚如何向下滚动到所需的项目,以便可以单击按钮。我注意到驱动程序可以选择 scroll()
,但我找不到带有机器人的选项。
是否有解决方法,或者是否有计划在将来为空手道机器人添加 scroll()
函数?
I have been using the Karate framework Robot component for desktop UI automation. With it, I need to click on a button in each row item of a data grid and using click()
doesn't work when the item is not in view/is offscreen. As such I'm trying to figure out how to scroll down to the items I need so I can click the button. I noticed with the driver there is an option to scroll()
but I haven't been able to find one with Robot.
Is there a workaround for this or are there plans to add a scroll()
function for karate-robot in the future?
发布评论
评论(1)
滚动肯定听起来像是现有的API可能缺少它。请考虑调查并为代码做出贡献,这将使发布速度更快。
同时,这是可能的解决方法:
Invoke()
, 由aPS请考虑贡献代码,代码库实际上很简单。在这里您可以在这里实现
scroll
模式: link 。Scroll certainly sounds like it may be missing from the existing API. Please do consider investigating and contributing to the code, which will just make it faster to release.
Meanwhile here are the possible workarounds:
invoke()
on it which is supported by a range of windows componentsP.S. please do consider contributing code, the code base is actually quite simple. And here is where you can implement the
Scroll
pattern: link.