File upload in Intern.js

怎甘沉沦 提交于 2019-12-25 04:28:27

问题


It is written in documentation that it is possible to do things like file upload using intern. Can anyone provide an example of how this can be done? I searched through examples and through LeadFoot documentation and I can't find anything.

Thanks.


回答1:


You interact with a file input form field, just like an end-user would, with the exception that you simply “type” the absolute path to the file you want to upload from the test machine.

return this.remote.findById('fileInput').type('/path/to/file');

See also How to click on <input type=file> across browsers using Selenium Webdriver?



来源:https://stackoverflow.com/questions/28430547/file-upload-in-intern-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!