-1

我以前没有与赛普拉斯合作的经验,我被困在这样一个简单的问题上 - 赛普拉斯无法访问 united.com 网站。任何其他页面都可以轻松打开。有什么建议么?

visit https://www.united.com/en/us/
CypressError
Timed out after waiting 60000ms for your remote page to load.

Your page did not fire its load event within 60000ms.

You can try increasing the pageLoadTimeout value in cypress.json to wait longer.

Browsers will not fire the load event until all stylesheets and scripts are done downloading.

When this load event occurs, Cypress will continue running commands.
cypress/integration/united.com.js:14:12
  12 | 
  13 |         //Step 1 - open main page
> 14 |         cy.visit(Cypress.env("env").UNITED_BASEURL)
     |            ^
  15 | 
  16 |         //Step 2 - select 'one-way flight'
  17 |         cy.get(mainRoot.body.oneway_radio_button, { timeout: 10000 }).should('be.visible').click()
4

2 回答 2

1

您可以使用 Onload 功能。一旦您的页面触发了其加载事件,就会调用 onLoad。此时保证所有脚本、样式表、html 和其他资源都可用。

链接:https ://docs.cypress.io/api/commands/visit#Options

  onLoad: (contentWindow) => {
    // contentWindow is the remote page's window object
    if (contentWindow.angular) {
      // do something
    }
  },
})```  
于 2021-07-31T15:39:15.003 回答
0

答案是 - 本网站使用 Akamai Bot Management

于 2021-06-28T09:09:06.910 回答