4

I have been trying to click on City bubble on Google Map. So far I have tried following but none seems to work. Also notice the awkward locator available from map which is captured in Selenium IDE

<tr>
<td>clickAt</td>
<td>//div[@id='map']/div/div[1]/div/div[4]/div/div/div[5]/canvas</td>
<td>586, 190</td>
</tr>

and

<tr>
<td>mouseDownAt</td>
<td>//div[@id='map']/div/div[1]/div/div[4]/div/div/div[5]/canvas</td>
<td>586, 190</td>
</tr>
<tr>
<td>mouseUpAt</td>
<td>//div[@id='map']/div/div[1]/div/div[4]/div/div/div[5]/canvas</td>
<td>586, 190</td>
</tr>

But none of these seem to work. Has any one been able to click on a specific position like city bubble using Selenium

1 Answer 1

7

I haven't tried this myself but shouldn't you be using the javascript googlemaps api instead of dom elements? There is even an open source selenium testsuite for it.

See http://code.google.com/p/gmaps-api-issues/wiki/SeleniumTests

And http://gmaps-api-issues.googlecode.com/svn/trunk/selenium/core/TestRunner.html?test=../tests/stable_suite.html

1
  • had seen these selenium tests in past and I thought they are also using DOM. java script Google Map API - looks interesting, let me see this... and yes +1 to you
    – Tarun
    May 15, 2011 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.