serenity-bdd - Serenity BDD 剧本登录示例
问题描述
我是 serenity BDD 的新手,无法理解这个概念,有人可以帮我一个使用剧本方法的简单登录屏幕示例。
这是我编写的代码,但我不确定我是否以正确的方式遵循该方法
@Before
public void setTheStage() {
OnStage.setTheStage(new OnlineCast());
}
@Given("^(.*) login in to qa")
public void samLoginInToQa(String actor) {
theActorCalled(actor).attemptsTo(NavigateTo.theQALoginPage());
theActorInTheSpotlight().attemptsTo(loginPage.login());
}
public static Performable login() {
return Task.where("{0} login to login",
Enter.theValue("aaa").into(Login.USERNAMEFIELD),
Enter.theValue("bbb").into(Login.PASSWORDFIELD),
Click.on(Login.SUBMITBUTTON)
);
解决方案
推荐阅读
- apache-spark - Apache spark 结构化流 2.3.0 如何让接收器知道新行是对现有行的更新?
- sparql - Jena SPARQL 查询执行卡住
- sql - 如何列出表中的所有外键?
- python - 如何在 tkinter GUI 上使按钮变平
- javascript - 有条件地分配和设置 js 对象属性
- angular - 通过返回函数在组件中绑定服务变量
- python-3.x - 在嵌入式文档列表字段中使用 Mongoengine 从嵌入式文档中删除特定值
- mysql - DateTimePicker.value 将不接受我传递给它的日期字符串 - vb.net
- javascript - 为什么在调用 setState 之前状态显示更新
- python - Python局部变量和全局变量搜索