How can I click on certain coordinates using selenium2 webdriver in C #?

I use Firefox with my test, but there is a problem when it comes to pressing flash buttons. I do not have access to the source code of the flash elements, so I can not use flash-selenium or something like that for the test.

Currently, my solution receives a screenshot with api windows and processes the screenshot and determines the coordinates of the buttons that I have to click on it, and then click on the windows again by clicking on the coordinates.

But this way I can not use my computer for anything else, and I have to wait for the PC to interact, unlike the webdriver's own functions.

I'm trying to take a screenshot on a Firefox page using webdriver (actually done) and get the coordinates of the flash button area in this screenshot and click on it without an element, because when I use to check if this is possible selenium ide, it cannot click with features like clickat, or am I doing something wrong.

+6
c # selenium-webdriver webdriver
source share
2 answers

In Selenium 2, you can simulate the movement of the mouse to the specified coordinates and click MoveToOffsetAction in the API for advanced user interactions. Currently, it is still under development and is not yet supported in Firefox or Internet Explorer drivers.

More information about the Advanced User Interactions API can be found on the official project wiki page: http://code.google.com/p/selenium/wiki/AdvancedUserInteractions

+6
source share

You can do it in Java as follows:

 Actions uploadbtn = new Actions(driver); uploadbtn.moveToElement(addfile, 518, 558).click().build().perform(); where X co-ordinates=518 and Y Co-ordinates=558 
0
source share

All Articles