Download a file protractor test case

折月煮酒 提交于 2019-11-28 22:36:42

问题


I am writting a protractor test case to download a file which can be of any type.

  • Scenario: Download a file
  • Step 1: Click on the Download Link
  • Step 2: Check whether the file is downloaded or not

How do i check if the file is downloaded correctly or not?


回答1:


I was able to achieve download testing with Chrome.

  1. Follow this config setup: https://stackoverflow.com/a/26127745/511069

  2. Create a function waitFileExists(fileAbsPath) and performs your expectations after the file is completely downloaded: https://stackoverflow.com/a/27031924/511069



来源:https://stackoverflow.com/questions/27193378/download-a-file-protractor-test-case

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