Selenium Web Driver _如何识别画布地图中的Web元素



我有一个地图作为画布:

<canvas class="ol-unselectable" width="1002" height="722" style="width: 100%; height: 100%;"></canvas>

和我需要在这个画布内找到web元素,以便应用很多动作:get adress, zoom, dézoom map ,...但是,不幸的是,当我在chrome浏览器上使用inspect element时,它没有检测到画布内的任何web元素。我使用Selenium WebDriver与PHP语言有什么建议吗??

你试过了吗:

//*[@class='ol-unselectable']

//*[@class='ol-unselectable']/*

//*[name() = 'canvas' and @class='ol-unselectable']

最新更新