【发布时间】:2021-12-10 20:28:39
【问题描述】:
所以我正在尝试运行赛普拉斯测试,用户转到右上角的下拉菜单并单击“我的设置”,然后单击名为“隐私政策”的链接:
it.only('2.5 - Press "Privacy Policy" on the "My Settings" screen. - "Armadillo Privacy Policy" screen is displayed', () => {
cy.login()
cy.get('body div button[data-cy=usermenubutton]')
.click()
.get('body div ul li[data-cy=mySettings]')
.contains('My Settings')
.click()
cy.get('a[href="/legal/privacy"]')
.click()
cy.screenshot()
})
但是,无论我如何重构,我都会继续收到此错误:
cy.click() failed because this element:
<a class='MuiTypography-root-bwkfm MuiTypography-root MuiTypography-inherit MuiTypography-root-dfghjk MuiLink-root MuiLink-underlineAlways" href="/legal/privacy">Privacy...</a>
is being covered by another element:
<div aria-hidden="true" class="MuiBackdrop-root-fghjkl hjk MuiBackdrop-root MuiBackdrop-invisible MuiModal-backdrop-klghjkhg tyutyu style="opacity: 1; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"></div>
Fix this problem, or use {force: true} to disable error checking.
【问题讨论】:
标签: cypress