Watin:文件上传...没有文件选择窗口?
像这样的“文件上传”HTML:
<input name="input_name" type="file" size="40" />
...出于安全原因,用户无法直接在输入区域中输入文本,对吗?而是弹出文件选择窗口。
在 Watin 自动化项目中,我们希望绕过文件选择窗口并将文件名直接放置在文本输入区域中 - 但我们没有找到实现此目的的方法。
如何才能做到这一点? ...或者可能由于安全限制而无法完成?
编辑--根据这个不太有希望: 以编程方式设置要在网页中上传的文件名称 有人有什么要补充的吗?
with "file upload" HTML like this:
<input name="input_name" type="file" size="40" />
...there is no way for users to directly enter text into input area for security reasons, correct? file selection window pops up instead.
In Watin automation project, we are wanting to bypass the file selection window and place filename directly in text entry area - but we are not finding a way to do this.
How can this be accomplished? ...or perhaps it cannot be done due to the security constraints?
EDIT-- Not very promising according to this:
Programmatically set name of file to upload in webpage
Anyone have something to add?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你尝试用javascript做到这一点吗?我的意思是 jQuery:
这只是一个想法,我无法在我的计算机上尝试。
did you try to do that with javascript ? I mean with jQuery:
It is just an idea, I can't try on the computer I am.