📌  相关文章
📜  在同一选项卡中打开窗口 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:31.551000             🧑  作者: Mango

代码示例2
const editWindowUrl = 
cy.window().then((win) => {
const stub = cy.stub(win, "open").as("windowOpen");
});
cy.contains("Edit").click();
cy.get("@windowOpen").should("be.called");
cy.window().then((win) => {
win.location.href = editWindowUrl;
});