我正在学习柏树自动化工具和基本概念的知识。因此,我试图自动化Microsoft登录页面,就像普通的登录页面一样,但是我得到了一个“未处理的承诺拒绝”错误。
我的代码如下所示,
it('Outlook', ()=> {
cy.visit('https://outlook.office.com/mail/')
cy.get('#i0116').clear().type('hello@gmail.com')
cy.get('#idSIButton9').click()
cy.get('#3i0118').clear().type('Password@123')
cy.get('#idSIButton9').click()
})
I tried adding the below code but I couldn't resolve the issue,
Cypress.on('uncaught:exception',(err,runnable,Promise)=>{
if(Promise){
return false
}
})错误描述:

发布于 2022-06-23 08:47:43
正如文档中所建议的那样,您不应该使用不受控制的应用程序。因此,尝试在本地运行一个应用程序并为其编写测试。例如:柏树应用或下载角形英雄之旅应用程序。示例
https://stackoverflow.com/questions/72725592
复制相似问题