Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

Maps testing using selenium webdriver Java

Solved 1 Answers 388 Views Selenium
0 1

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

1 Answer

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.
answered by
selected by
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.

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.