任何人都知道如何选择要下载的附件中包含的特定元素,因为我无法选择相应的附件。我放在下面的屏幕截图:下面是特定容器的 html 代码 <div class="attachment-wrap"> <!-- Comment Title --> <div id="attachmentTitle-wrapTEST" class="attachmentTitle-wrap"> <h2>Attachments</h2> </div> <div id="attachment-containerTEST"><!-- Attachment Box --> <div class="comment-box"> <!-- Comment Image --> <div class="col-xs-2"> <div class="attachmentImg"> <img src="downloadAttachment?attachmenturl=/secure/thumbnail/10104/_thumb_10104.png" /> </div> </div> <!-- Attachment details --> <div class="col-xs-10"> <div class="commentContent"> <div class="topRow"> <div class="username">1177A149.PNG</div> <div class="commentTimeStamp">25927 KB</div> </div> <div class="bottomRow"> <div class="commentDisplay"> <a href="downloadAttachment?filename=1177A149.PNG&id=10104&mimeType=image/png" target="_blank">Download</a> </div> </div> </div> </div> </div> <div class="comment-box"> <!-- Comment Image --> <div class="col-xs-2"> <div class="attachmentImg"> <img src="downloadAttachment?attachmenturl=/secure/thumbnail/10103/_thumb_10103.png" /> </div> </div>感谢您能帮我解决这个问题。
2 回答
拉莫斯之舞
TA贡献1820条经验 获得超10个赞
您创建特定于 png 名称的 xpath。看这里
//a[contains(@href,'downloadAttachment?filename=4D7746B6.PNG')]
它将指向具有 filename=4D7746B6.PNG 的下载链接
- 2 回答
- 0 关注
- 209 浏览
添加回答
举报
0/150
提交
取消