我在页面上有以下 DOM
<button type="submit" ng-reflect-disabled="true" disabled="">
Save & Exit
</button>
我也有一个(屏幕播放)组件来定位它的属性
import {Attribute, Target} from "serenity-js/lib/serenity-protractor";
import {by} from "protractor";
export class myComponent {
public static saveAndExit = Target.the('"Save & Exit" submit button')
.located(by.buttonText("Save & Exit"));
public static saveAndExitAttribute = Attribute.of(CreateClientComponent.saveAndExit);
}
我要做的就是确保 DOM 标记了disabled属性,但是我在 step_definitain 文件中的以下尝试无济于事
this.Then(
/^he should see "Save & Exit" button still is disabled$/,
function(buttonText) {
return expect(
this.stage.theActorInTheSpotlight().toSee(CreateClientComponent.saveAndExitAttribute),
).to.equal("");
});
Basiccaly我没有足够的了解如何使用属性的问题来定位任何属性
我也没有找到它的任何用例,任何建议,提示将不胜感激