Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using google map api in my site and I want to test the cursors on map using Selenium IDE.
Now I use this code and it works fine:

clickAt > xpath=(//map[@id='gmimap85'])

but it tests only one cursor (cursor number 85), and map page is a dynamic page so I want a way to make selenium select any random cursor on map page.

Any help would be appreciated.

share|improve this question
If you want it fully automated you should use WebDriver But if you dont mind using a specific range of number do a loop using sideflow.js user Extension for IDE – Theo Apr 10 '13 at 10:00
i will try it thank you a lot – Mai Hanafy May 2 '13 at 10:16
up vote 0 down vote accepted

I'm not sure if you have a set range but what you can use is:

store|javascript{"http://gmimap" + Math.floor(Math.random()*11);}|randomcoord

share|improve this answer
didn't work :( please help me more – Mai Hanafy May 2 '13 at 15:41
cursor details map id="gmimap208" name="gmimap208"> <area log="miw" coords="11,0,12,1,13,2,14,3,14,4,14,5,14,6,14,7,14,8,14,9,14,10,13,11,12,12,12,1‌​3,11,14,10,15,10,16,9,17,9,18,8,19,7,20,7,20,7,19,6,18,6,17,5,16,4,15,4,14,3,13,2‌​,12,2,11,1,10,1,9,0,8,0,7,0,6,0,5,1,4,1,3,2,2,2,1,4,0,11,0" shape="poly" title="" style="cursor: pointer;"> </map> – Mai Hanafy May 2 '13 at 15:42
<div class="gmnoprint" style="width: 15px; height: 21px; overflow: hidden; position: absolute; opacity: 0.01; left: 373px; top: 370px; z-index: 2000;"> <img style="position: absolute; left: 0px; top: 0px; width: 15px; height: 21px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="/img/property_icons/free/normal.png" draggable="false" usemap="#gmimap226"> <map id="gmimap226" name="gmimap226"> – Mai Hanafy May 2 '13 at 15:42
hank you everyone for trying help me :) i finally did it just |click | //map/area | | this command clicks at the first ID cursor in map page :) – Mai Hanafy May 7 '13 at 19:39
I think we can work on axis path in a map for testing. – Emmanuel Angelo.R Feb 13 '14 at 6:21

Your Answer


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.