【发布时间】:2019-07-13 11:06:33
【问题描述】:
我正在尝试发送 naver 电子邮件自动化 python 脚本,而我不能做的一件事是在没有 SendKeys 方法的情况下上传文件(甚至不必输入标签(元素)。我在谷歌搜索只有上传了一个带有输入标签的文件。请帮帮我。
我尝试通过 sendkeys 进行编码,但错误是 selenium.common.exceptions,ElementNotInteractableException: Message: element not interactable
# Attachment
if attach:
attach = config.attachment
self.driver.find_element_by_xpath('//[@id="write_drag_here"]').send_keys('path in here')
print('attachment activated')
time.sleep(10)
else:
print('attachment deactivated')
我如何编码这个 HTML *HTML 代码:**
<a href="#" id="AddButton_fla" class="utx_btn_b _c1(mwAttach|clickUpload)
_stopDefault" onclick="ccr(this,'wrh.attach',event)" style="display: none;">
<span class="utx_inrbtn">내 PC</span></a>
<a href="#" id="AddButton_html5" class="utx_btn_b
_click(mwAttach|clickHtml5Upload) _stopDefault"
onclick="ccr(this,'wh5.attach',event)" style="display: inline-block;">
<span
class="utx_inrbtn">내 PC</span></a>
注意:如果您有什么不明白的地方,请随时再问我。
谢谢
【问题讨论】:
标签: python-3.x selenium selenium-webdriver automation