Protractor - upload file/ running exe via protractor

二次信任 提交于 2019-12-04 14:37:33
KCaradonna

You can't control windows dialog boxes with Protractor since it uses webdriver.

The code above will not enter the file path into the windows dialog box but rather it is sending the absolute file path directly to the file upload element on the page.

If you remove the $('#uploadButton').click(); it should work, however if the website you're testing on doesn't allow this type of injection, you may need to write a script to manually expose the element.

See How to upload file in angularjs e2e protractor testing for more information.

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