我想知道是否可以使用赛普拉斯测试可覆盖的下拉菜单栏。
例如,当您访问 Ebay ( https://www.ebay.com ) 时,您会在页面右上角看到警告图标,如果您将鼠标悬停在该元素上,登录通知框将出现。
这是我的代码,我按照赛普拉斯告诉我的操作,但我得到了一个错误,比如......
AssertionError 重试超时:应找到元素:#ghn-err,但从未找到它。
it('ebay hover test', () => {
cy.visit('https://www.ebay.com')
// 1. alert icon hover test.
cy.get('#gh-Alerts-i').trigger('mouseover')
cy.get('#ghn-err').should('be.visible')
// 2. This is my another test.
// cy.get('#gh-eb-My > .gh-menu > .gh-eb-li-a > .gh-sprRetina').trigger('mouseover')
//cy.get('#gh-eb-My-o > .gh-eb-oa thrd').should('be.visible')
})
我应该怎么做才能解决这个问题?
先感谢您!