【问题标题】:How do I set the pageloadtimeout in Cypress?如何在 Cypress 中设置页面加载超时?
【发布时间】:2023-01-08 03:37:51
【问题描述】:

如何在 cypress.config.js 文件中设置 pageloadtimeout?有这个链接Documentation,但我不确定将 pageloadtimeout 放在文件中的什么位置。

我试过将它粘贴到文件中,但它给了我错误。我认为这是因为我没有把它放在正确的地方。

【问题讨论】:

    标签: cypress


    【解决方案1】:

    如果您在页面中搜索 pageLoadTimeout,第一个实例会出现在该部分全球的(见右侧的页面索引)。

    这意味着您将选项放在 e2ecomponent 部分之外。

    const { defineConfig } = require('cypress')
    
    module.exports = defineConfig({
      pageLoadTimeout: 70_000,
      e2e: {
        baseUrl: 'http://localhost:1234'
      }
    })
    

    【讨论】:

      猜你喜欢
      • 2019-05-15
      • 2011-04-11
      • 2018-03-16
      • 2015-11-23
      • 2012-05-23
      • 2019-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多