我试图将 pico-container DI 合并到我的框架中,这样我就可以在多个步骤定义中使用 @Before 和 @After 标记。请参阅下面的错误。任何建议都会很棒。
You're not allowed to extend classes that define Step Definitions or hooks. class steps.hotelBookingFormPage extends class resources.hooks
import io.cucumber.java.en.Given;
import org.openqa.selenium.internal.ShutdownHooks;
import resources.hooks;
public class hotelBookingFormPage extends hooks {
public hooks base;
hotelBookingFormPage (hooks base) {
base = hooks.startBrowser();
}
@Given("I navigate to the hotel booking form page")
public void iNavigateToTheHotelBookingFormPage() {
base.driver.get("http://hotel-test.equalexperts.io/");
}