小编Sun*_*nny的帖子

是否有一种优雅的方法来编写 cypress 测试来查找所有子元素的 z-index 是否位于特定范围内(例如:200-299)?

给定一个 div,是否有一种优雅的方法来查找该 div 的所有子元素的 z-index 值是否在特定范围内(例如:200-299)。因此,对于给定的示例代码,我需要测试类名为childDivClass 的div和类名为imgClass的图像是否在200299的 z-index 范围内。

<div class="rootDivClass">
 <div class="childDivClass">
  <img class=imgClass">
  </img>
 </div>
</div>
Run Code Online (Sandbox Code Playgroud)

html testing z-index getcomputedstyle cypress

2
推荐指数
1
解决办法
223
查看次数

标签 统计

cypress ×1

getcomputedstyle ×1

html ×1

testing ×1

z-index ×1