6
votes

I'm using Firefox with my test but there is a problem when it comes to clicking flash buttons. I don't have access the source codes of flash elements, so i can't use flash-selenium or anything similar for test.

Currently my solution is getting a screenshot with windows api, and processing the screenshot and defining the button coordinates which I'm supposed to be click on it, then again with windows api clicking on the coordinates.

But in this way, i can't use my computer for anything else and i must wait for interacting pc unlike webdriver's own functions.

I'm trying to do getting a screenshot on Firefox page with webdriver (it's done actually), and getting in that screenshot the area coordinates of flash button and clicking on it without element based because when i use for checking if it's possible selenium ide, it can't click with functions like clickat or i am doing something wrong.

2
It's pronounced C Sharp. What's the problem?Rob

2 Answers

6
votes

In Selenium 2 you will be able to simulate moving the mouse to specified co-ordinates and click using the MoveToOffsetAction in the Advanced User Interactions API. This is currently still in development and not yet supported in the Firefox or Internet Explorer drivers.

More details of the Advanced Users Interactions API can be found on the project's official wiki page: http://code.google.com/p/selenium/wiki/AdvancedUserInteractions

0
votes

You can do it in Java as following:

Actions uploadbtn = new Actions(driver);  
uploadbtn.moveToElement(addfile, 518, 558).click().build().perform();

where X co-ordinates=518
and Y Co-ordinates=558