Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium tests for Google maps

Does anyone have a code example for a Selenium test (or some other browser testing environment) on a Google Maps API V3 map? Specifically, I want to interact with the markers and popup windows.

like image 506
Johnny Avatar asked Apr 25 '11 14:04

Johnny


People also ask

Is Google Maps API free for website?

All Maps Embed API requests are available at no charge with unlimited usage.

Does Google have mapping software?

Welcome to. Google Maps Platform. See where real-world insights and location solutions can take your business.


1 Answers

Solved. Not 100% elegant but it works. Set optimized : false on the markers. This makes them all appear on the map (docs). Then set the XPath selector in the Selenium test to '//div[@class="gmnoprint" and @title], this will select all the markers. You can then interact with the markers. See also this Google groups posting.

like image 120
Johnny Avatar answered Dec 15 '22 21:12

Johnny