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

问题描述 投票:0回答:0

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

<div class="rootDivClass">
 <div class="childDivClass">
  <img class=imgClass">
  </img>
 </div>
</div>
html testing cypress z-index
© www.soinside.com 2019 - 2024. All rights reserved.