【发布时间】:2017-04-12 22:01:43
【问题描述】:
我有一个带有工具提示的 Web 元素,它显示以下消息: ● 客户账簿收入 20,966,618 美元
该工具提示的 HTML 代码如下。我可以使用 Selenium Webdriver 将鼠标悬停在 Web 元素上,这使工具提示可见,但我不知道如何从中获取文本。有人可以帮忙吗?
<div class="highcharts-tooltip" style="position: absolute; left: 755px; top: 0px; display: block; opacity: 1; pointer-events: none; visibility: visible;">
<span style="position: absolute; font-family: "Roboto",sans-serif; font-size: 12px; white-space: nowrap; color: rgb(51, 51, 51); margin-left: 0px; margin-top: 0px; left: 0px; top: 0px;">
<div class="client-rate-bench-chart">
<table class="table rdo-table-tooltip">
<tbody>
<tr>
<td>
<span style="color:rgba(45,108,162,1)">●</span>
Client Book Revenue
</td>
<td> $20,966,618 </td>
</tr>
</tbody>
</table>
</div>
</span>
</div>
【问题讨论】:
标签: python selenium selenium-webdriver