I'm trying to learning Serenity BDD framework but i encounter some issues which need guidance from expect.I have downloaded serenity-cucumber4-starter-master from github.
Problems:
My Code so far:
public class LoginTask implements Task {
private HomepageScreen hp;
@Override
@Step("Landing on Guru Bank Website")
public <T extends Actor> void performAs(T obj) {
obj.attemptsTo(Open.browserOn(hp));
}
}
@RunWith(SerenityRunner.class)
public class CucumberTestSuite {
@Managed(driver = "chrome")
private WebDriver browser;
private Actor john = Actor.named("john");
// =================================================================================
@Before
public void setup() {
john.can(BrowseTheWeb.with(browser));
}
@Test
public void login() throws InterruptedException {
//givenThat(john).can(BrowseTheWeb.with(browser));
System.out.println("Automate web browser");
//givenThat(john).wasAbleTo(LoginTask.);
Thread.sleep(9000);
}
}
givenThat() method is undefined. Where to get the import location?
Please help. Thanks.
给givenThat()
方法(和其他类似方法)在net.serenitybdd.screenplay.GivenWhenThen
中定义。
import static net.serenitybdd.screenplay.GivenWhenThen.seeThat;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.