如何在灯具/下载文件夹中下载文件

发布于 2025-02-11 10:53:50 字数 121 浏览 0 评论 0原文

这将在我不想下载的柏树\下载文件夹中下载,我需要更改fixtures

cy.readfile中的下载位置(“ cypress \ downloads” + filename +“ .csv”)。应该(“存在”);

This will download in in cypress\downloads folder which i not want to download , i need to change the download location in fixtures

cy.readFile("cypress\downloads" + fileName + ".csv").should("exist");

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深陷 2025-02-18 10:53:50

您可以更改cypress.json中下载的位置:

{
  "viewportHeight": 880,
  "viewportWidth": 1280,
  "downloadsFolder": "yourPathHere"
}

在下面的代码中,属性“下载者”负责更改下载的位置。更多信息在这里

You can change the location of downloads in cypress.json like this:

{
  "viewportHeight": 880,
  "viewportWidth": 1280,
  "downloadsFolder": "yourPathHere"
}

In the code below, the property "downloadsFolder" is responsible to change the location of downloads. More information here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文