【发布时间】:2017-08-04 03:49:21
【问题描述】:
我的测试 Html 像这样:
<a class="waves-effect waves-light btn red ">Delete</a>
删除
我想使用 CSS 选择器:
.red:not(.disabled):first
但我写在 Codeception Acceptance 测试用例中
$I->click(['css' =>'.red:not(.disabled):first']);
它会抛出一个错误:
Strict locator is malformed: css => .red:not('.disabled):first
Codeception如何获取这个元素?
【问题讨论】:
-
也许还有另一种组成选择器的方式,如果可能的话,请添加元素的html sn-p,同时启用和禁用的情况。
标签: codeception