我正在尝试点击链接以将文件附加到页面。页面的 HTML 结构是
<div class="multi_attach_files">
<span id="WorkkardFileUploader" class="file_uploader">
<div id="px-widget-1" class="px-widget ui-widget-px">
<div class="ui-helper-clearfix">
<div id="px-form-1-input" class="px-form-input">
<form id="pxupload1" name="multipleFileUpload" style="" target="pxupload1_frame" action="/multiupload" method="POST" enctype="multipart/form-data" encoding="multipart/form-data">
<div class="px-input-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button">
<span class="ui-button-text">
<span class="label">Attach Files</span>
<span id="dragMsg" class="dragcontainer">Drag Here</span>
<input id="wkFileUpload" class="fileupload" type="file" multiple="" tabindex="-1" name="noteFilename" title="Attach Files" style="background-color: transparent;">
</span>
</div>
我已经尝试过.sendkeys()
了,但是元素(id="wkFileUpload"
)对 Selenium 不可见。
有人可以提出任何建议吗?