Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
    
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 '11 at 4:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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