Maps testing using selenium webdriver Java

0 votes


I have a task here to write the automation script for maps that are similar to google maps. so the test steps are as follows.

clicking on the region drop down.
selecting a radio button from region drop down.
Once the region is selected a particular area in maps get highlighted (This highlighted area changes every time we select a different region from the above step).
Now if we click in the area that highlighted in the map a popup window will get displayed.
My question is how to identify that highlighted area using selenium as it is not an element. If we click anywhere else in the map other than highlighted one there won't be any change.


A similar image can be seen from attached url

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by
selected by
0 votes
Best answer
You can get CSS value of that element by using webelement.getCssValue("color") as a String and loop it till its highlighted.

You may click on highlighted area by creating relative xpath.

Hope it helps.
commented by
Hi Mayur,

Thank you very much for your response. If you don't mind can you please help me by posting a sample script in getting css value and looping. I am actually new to Selenium.
commented by
Post HTML of your webpage. One of our users can help you writing the code.