我正在尝试使用 cypress 自动化 Orangehrm 网站(https://opensource-demo.orangehrmlive.com/index.php/auth/login)
我的用例
我尝试使用 cypress 但不知何故鼠标悬停不起作用。请建议点击 KPI 链接的最佳方式。
截图
cypress -real-events库悬停命令工作正常
cy.get('#menu__Performance')
.realHover()
cy.contains('#menu_performance_Configure', 'Configure')
.realHover()
cy.contains('#menu_performance_searchKpi', 'KPIs')
.click({force:true})
cy.contains('h1', 'Search Key Performance Indicators')
Run Code Online (Sandbox Code Playgroud)
注意
需要最后一个命令,force因为确实会发生元素剪切。
安装
npm install cypress-real-events
//or
yarn add cypress-real-events
Run Code Online (Sandbox Code Playgroud)
赛普拉斯/支持/index.js
import "cypress-real-events/support";
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
993 次 |
| 最近记录: |