下载文件量角器测试用例 [英] Download a file protractor test case
本文介绍了下载文件量角器测试用例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我书面方式一potractor测试用例下载它可以是任何类型的文件。
I am writting a potractor test case to download a file which can be any type.
senario:To download a file
Step 1-click on the downloadlink
Step 2-check whwther the file is downloaded or not
我现在该如何检查文件是否正确或不下载。
how do i now check that the file is downloaded correctly or not.
推荐答案
我是能够实现与Chrome的下载测试。
I was able to achieve download testing with Chrome.
-
请按照此配置设置:<一href=\"http://stackoverflow.com/a/26127745/511069\">http://stackoverflow.com/a/26127745/511069
创建一个函数waitFileExists(fileAbsPath)
和之后的文件完全下载执行你的期望:<一href=\"http://stackoverflow.com/a/27031924/511069\">http://stackoverflow.com/a/27031924/511069
Create a function waitFileExists(fileAbsPath)
and performs your expectations after the file is completely downloaded: http://stackoverflow.com/a/27031924/511069
这篇关于下载文件量角器测试用例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文