Placing a built-in Google map marker with Selenium

I have an asp.net website that, as part of the wizard, uses the built-in google map to select a location by clicking on the map to place a marker. How do I automate this using Selenium?

In particular, I tried:

  • Clickat
  • DoubleClickAt
  • Mousedownown
  • Mouseupp

In all cases, passing the div map identifier as a locator and "100,100" as a coordinate.

I don’t care where the marker is placed on the map, if I can place this marker.

+3
source share
2 answers

Team:

<tr>
    <td>clickAt</td>
    <td>//div[@id='gmap']/div/div[1]</td>
    <td>(400,300)</td>
</tr>

works for me.

+1
source

Google "Open Sourced" Selenium Google. , .

http://code.google.com/p/gmaps-api-issues/wiki/SeleniumTests

0

Source: https://habr.com/ru/post/1740081/


All Articles