Selenium tests for Google maps Selenium tests for Google maps selenium selenium

Selenium tests for Google maps


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.


It's been a long time since this question has been answered, but I think it's nice to post here another solution that offers other possibilities that didn't exist at the time, for people that are interested in that topic

You can use SikuliFirefoxDriver to automate Google Maps with WebDriver, with the image recognition tooling of hte great Sikuli software