gpt4 book ai didi

cypress - 为cypress.io的特定its-Method增加超时时间

转载 作者:行者123 更新时间:2023-12-02 09:08:38 24 4
gpt4 key购买 nike

使用 cypress.io get-Method 我们可以定义一个只对这个特定的 get-method 调用有效的超时:

cy.get('.mobile-nav', { timeout: 10000 })

有没有办法为特定的 its-method 调用定义超时,例如:
cy.window().its('MyClass')

或者我需要在 cypress.json 中增加 defaultCommandTimeout 吗?

最佳答案

在你想使用它之前把它放在它的块中:

Cypress.config('defaultCommandTimeout', 10000);

Cypress.config() documentation

关于cypress - 为cypress.io的特定its-Method增加超时时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55019061/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com