相关疑难解决方法(0)

赛普拉斯测试伪CSS类:之前

有没有一种方法可以content通过Cypress在元素上测试:CSS的伪CSS类?

我看过链接记录:

但是我没有使用::before伪类为CSS类找到任何东西。

想象一下代码:

.myClass:before {
  content: "foo-";
}
Run Code Online (Sandbox Code Playgroud)
<div>
  <span class="myClass">Bar</span>
</div>
Run Code Online (Sandbox Code Playgroud)

如何测试“ foo-”的存在?

css testing integration-testing cypress

3
推荐指数
2
解决办法
834
查看次数

标签 统计

css ×1

cypress ×1

integration-testing ×1

testing ×1