简体   繁体   中英

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. I know that Webdriver could not interact with flex objects.For that I have integrate the Webdriver with the ROBOT framework. 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.

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 actions = new Actions(driver);
actions.moveToElement(someElement);
actions.click();
actions.perform();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM