I am not able to create a Selenium test case to automate clicking on Google Maps (specifically, creating markers by single-clicking on the map).
Record function in IDE
The "Record" function records my mouse click as
<tr> <td>click</td> <td>//div[@id='map_canvas']/div[3]/div/div/div[4]/div/div/div[5]</td> <td></td> </tr>
When executing the command, this not only places the marker way outside the visible map view, but it is also not reliable on page refresh because the GMap nested div structure changes every time.
clickAt
Here it was suggested to use clickAt with the outside div's div, like so:
<tr> <td>clickAt</td> <td>//div[@id='map_canvas']/div/div[1]</td> <td>(400,300)</td> </tr>
This does not work at all. I have tried every variation of click, clickAt, and mouseDown/mouseUp that I can think of, but nothing seems to register.
I do know that Google has released their Selenium test suites, but I cannot figure out how to use it to my advantage. Any help would be appreciated!
Edit: It seems to be that the reason Google's approach (and all the other approaches that I've found) don't work is because I am using v3 of Google's Maps API. Google's own Selenium tests seem to be using v2.