[英]Can I have a mouse event specific to a browser window?
I am using Selenium Webdriver for Automation, and there are few flex objects which I need to interact with. 我正在使用Selenium Webdriver for Automation,几乎没有需要与之交互的flex对象。 I know that Webdriver could not interact with flex objects.For that I have integrate the Webdriver with the ROBOT framework. 我知道Webdriver无法与flex对象交互。为此,我将Webdriver与ROBOT框架集成在一起。 The problem I am facing is that I need to have focus on the current window for the mouse to detect the location of an element. 我面临的问题是,我需要专注于当前窗口,以便鼠标检测元素的位置。 If I touch My mouse while the execution is in progress, the element could not be found. 如果在执行过程中触摸我的鼠标,则找不到该元素。
Can anyone please suggest me some alternatives to trigger a mouse event explicitly for the browser window, So that I can work on other things while my test execution is in progress? 任何人都可以建议我一些替代方法来显式触发浏览器窗口的鼠标事件,以便在测试执行过程中进行其他工作吗?
I am using Java. 我正在使用Java。
I don't believe that this is possible with Robot. 我不相信机器人可以做到这一点。 However, if you use the Actions API, then you can mouse over stuff, and so forth without having the computer actually use your mouse. 但是,如果您使用Actions API,则可以将鼠标悬停在东西上,依此类推,而无需计算机实际使用鼠标。
Actions actions = new Actions(driver);
actions.moveToElement(someElement);
actions.click();
actions.perform();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.