【问题标题】:How to override cypress json file in a specific spec?如何覆盖特定规范中的 cypress json 文件?
【发布时间】:2021-11-23 10:26:34
【问题描述】:

如何覆盖特定规范中的 cypress json 文件? 它('', { chromeWebSecurity:假 }, () => {

【问题讨论】:

    标签: json overriding cypress config


    【解决方案1】:

    您可以为此使用Cypress.config()

    it('some Test', () => {
      Cypress.config('chromeWebSecurity', false)
      //Rest of the test
    })
    

    【讨论】:

    • cy.log(Cypress.config('chromeWebSecurity')) // true Cypress.config('chromeWebSecurity', false); cy.log(Cypress.config('chromeWebSecurity')) // false 试过这种方式但不影响测试结果,访问嵌入在应用程序中的跨域iframe时仍然失败。 link
    猜你喜欢
    • 2021-06-11
    • 2021-11-24
    • 2019-09-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-28
    相关资源
    最近更新 更多