开发者

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 wind开发者_运维技巧ows.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜