I am writting a potractor test case to download a file which can be any type.
我正在编写一个po拖拉机测试用例来下载任何类型的文件。
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.
如何检查文件是否被正确下载。
1 个解决方案
#1
13
I was able to achieve download testing with Chrome.
我能用Chrome实现下载测试。
-
Follow this config setup: https://*.com/a/26127745/511069
遵循以下配置设置:https://*.com/a/26127745/511069
-
Create a
function waitFileExists(fileAbsPath)
and performs your expectations after the file is completely downloaded: https://*.com/a/27031924/511069创建一个函数waitFileExists(fileAbsPath),并在完全下载文件之后执行您的期望:https://*.com/a/27031924/511069
#1
13
I was able to achieve download testing with Chrome.
我能用Chrome实现下载测试。
-
Follow this config setup: https://*.com/a/26127745/511069
遵循以下配置设置:https://*.com/a/26127745/511069
-
Create a
function waitFileExists(fileAbsPath)
and performs your expectations after the file is completely downloaded: https://*.com/a/27031924/511069创建一个函数waitFileExists(fileAbsPath),并在完全下载文件之后执行您的期望:https://*.com/a/27031924/511069