Cypress 显示 JS window._tcfapi 错误,我无法从手动测试中重现

问题描述

重现此错误的 Cypress 测试 https://github.com/Robot72/quantcast-cypress-issue/blob/master/cypress/integration/quantcast/check_errors.spec.js

此测试代码

context('Navigation to our website',() => {
  it('Visit and check quantcast has error or not',() => {
    cy.visit('https://www.nanoresort.com/stories/celebrities-lost-money-can-no-longer-afford-extravagant-lifestyles/');
  })
})

截图显示了这个问题 window._tcfapi error

如果我在浏览器中从测试中打开此链接,则不会看到此 window.__tcfapi 错误。对于使用 quantcast 库的任何其他网站,我可以从 cypress 中重现此错误,但在没有 cypress 的情况下,我在浏览器中看不到此错误

你能帮我理解为什么在 cypress 运行这个测试时出现这个错误吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)