在cypress中单击打印按钮期间,如何关闭print window
打开。我正在调用js
函数来关闭窗口,但窗口没有执行关闭操作,有人可以建议如何解决此问题吗?
context('Print button tests', () => {
it.only('Verify the display of Print and close the window', () => {
cy.get('.timetable-filter-panel-button.btn.btn-primary > span')
.contains("Print current view")
.click();
printClose();
})
})
// Javascript函数关闭打开的窗口:
function printClose(){
window.close();
}