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.

There is a lot of cursors in the map. Every time you refresh the map you will get another different cursors with different IDs, o I can't use the IDs.

I want to click at any cursor, a tooltip should appear when I click any of them. I've tried lots of things but I can't do it.

All 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,13,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>

<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">

XPath for cursor 1

/html/body/div[5]/div[2]/table/tbody/tr/td[2]/div[3]/div[2]/div/div/div[3]/div[2]/div[50]/map/area

XPath for cursor 2

/html/body/div[5]/div[2]/table/tbody/tr/td[2]/div[3]/div[2]/div/div/div[3]/div[2]/div[25]/map/area

XPath for cursor 3

/html/body/div[5]/div[2]/table/tbody/tr/td[2]/div[3]/div[2]/div/div/div[3]/div[2]/div[9]/map/area

CSS

html.win body.rtl div.content-for-layout div#page-container table tbody tr td div#Map div div div div div div.gmnoprint map#gmimap83 area

HTML

<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,13,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;"> 
share|improve this question
    
Mai, are you just making an observation about the dynamic nature of IDs in maps, or did you intend to ask a question? –  user246 May 2 '13 at 16:12
    
sorry for the lack of clarity my question i want to click at any cursor, tooltip should appear when i click any of them i want to test if if that tooltip will appear when i clik at any cursor or not sorry again if my english was poor –  Mai Hanafy May 2 '13 at 16:26
add comment

1 Answer 1

There seem to be two problems in your question: how to you locate the cursors (clickable parts of the map), and how do you determine whether a tooltip appears when you click a cursor. You did not explicitly ask about the second problem, so I will assume you are mostly interested in the first part.

If all of your cursors are area elements, you might try using an Xpath like //area.

share|improve this answer
    
thank 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
add comment

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.