【发布时间】:2020-02-01 00:55:32
【问题描述】:
我需要单击 iframe 中的 div 才能触发下载。我很难找到 iframe 元素,因为它没有 ID。这是 iframe 元素:
<iframe title="data visualization" src="https://sample.com" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen="true" style="width: 100%; height: 100%; display: block; visibility: visible;" allowtransparency="true"></iframe>
这是 iframe 中的 div 元素:
<div tabindex="-1" class="tabToolbarButton tab-widget download" role="button" style="width: 95px; -ms-touch-action: none;" aria-label="Download">
<span class="tabToolbarButtonImg tab-icon-download"></span>
<span class="tabToolbarButtonText">Download</span>
</div>
【问题讨论】:
-
请不要张贴代码作为截图。获取您的代码并将其直接发布在问题中,以便有人可以在他们的机器上复制您的问题。
-
已添加代码。
标签: javascript html excel vba internet-explorer