File upload in Intern.js

2019-09-19 01:59发布

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条回答
唯我独甜
2楼-- · 2019-09-19 02:22

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?

查看更多
登录 后发表回答