I am new in Cypress and I have a problem.(我是赛普拉斯的新手,但有问题。)
I the app, I have a "Save Button".(在应用程序中,我有一个“保存按钮”。)
When you click the button, it is triggered JS window.prompt()
.(当您单击按钮时,将触发JS window.prompt()
。) Inside the prompt you write the name of the save (like "Save from John") and click to "OK" - inside the prompt.(在提示符内,输入保存名称(如“从John保存”),然后单击“确定”-在提示符内。)
I need to cover this user story by the E2E test in Cypress.io.(我需要通过Cypress.io的E2E测试来介绍这个用户故事。)
Problem is, when I click the "Save button", cypress freeze in Click() event, when the prompt is displayed.(问题是,当我单击“保存按钮”时,当显示提示时,柏树会在Click()事件中冻结。)
it('Make a new save with JS prompt', () => {
cy.get('#save-changes-button')
.should('be.visible')
.click() //here the prompt is displayed, cypress stop and wait for click() event finish
})
May I ask for some help?(我可以寻求帮助吗?)
I did not found siutable solution in Cypress.io Docs or elsewhere.(我在Cypress.io Docs或其他地方没有找到合适的解决方案。)
ask by bares697 translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…