在Selenium中放置嵌入式Google地图标记 [英] Placing an embedded google map marker with Selenium

查看:140
本文介绍了在Selenium中放置嵌入式Google地图标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net网站,作为向导的一部分,使用嵌入式谷歌地图通过点击地图选择一个位置来放置一个标记。如何使用Selenium自动执行此操作?



我特别试过:


  • ClickAt

  • DoubleClickAt

  • MouseDownAt

  • MouseUpAt



在所有情况下,将地图div id作为定位符并将100,100作为坐标。

我不关心地图上标记的位置只要我可以放置该标记即可。

解决方案

命令:

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

适合我。


I have an asp.net website which as part of a wizard uses an embedded google map to select a location by clicking on the map to place a marker. How do I automate this with Selenium?

In particular I've tried:

  • ClickAt
  • DoubleClickAt
  • MouseDownAt
  • MouseUpAt

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

I don't care where on the map the marker is placed, as long as I can place that marker.

解决方案

The command:

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

works for me.

这篇关于在Selenium中放置嵌入式Google地图标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆