【发布时间】:2020-09-14 13:32:38
【问题描述】:
我正在使用Vividus 来测试我的应用程序。
单击下载按钮后如何测试文件是否已下载?
【问题讨论】:
标签: automation ui-automation vividus
我正在使用Vividus 来测试我的应用程序。
单击下载按钮后如何测试文件是否已下载?
【问题讨论】:
标签: automation ui-automation vividus
推荐的方法:
vividus-plugin-rest-api 步骤下载文件(您可能还需要使用vividus-plugin-web-app-to-rest-api 步骤将cookie 从浏览器注入到Web UI)实现示例:
When I set 'href' attribute value of the context element to the 'scenario' variable 'file-to-download'
When I set browser cookies to the API context
When I issue a HTTP GET request for a resource with the URL '${file-to-download}'
Then `${responseCode}` is equal to `200`
【讨论】: