2016-01-22 101 views
0

无法找到谷歌地图内的元素。硒findElement不适用于谷歌地图

<g-map id="map-contain" style="position: relative; overflow: hidden; transform: translateZ(0px); background-color: rgb(229, 227, 223);"> 
    <div class="gm-style" style="position: absolute; left: 0px; top: 0px; overflow: hidden; width: 100%; height: 100%; z-index: 0;"> 
     ::::: 
     :::::: 
     :::::: 
    </div> 
<g-map> 

我想这个没有运气与班“通用式”

this.driver.findElement(By.xpath('//div[@class="gm-style"]')); 

我怎样才能获得G-地图标记中的元素以选择div?

回答

1

我会尝试通过id匹配外部g-map标签并获取它的子项。 Ids应该是唯一的,而类别大多不是

相关问题