package cz.moneta.test.dsl.demo.web;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.endpoints.demo.DemoChromeWebEndpoint;
import cz.moneta.test.harness.support.web.Builders;

public class DemoWebChrome {

    private final Harness harness;

    public DemoWebChrome(Harness harness) {
        this.harness = harness;
    }

    public DemoTestPage openTestPage() {
        DemoChromeWebEndpoint demoChromeWebEndpoint = harness.getEndpoint(DemoChromeWebEndpoint.class);
        demoChromeWebEndpoint.openApplication();
        return Builders.newWebFlowBuilder(DemoTestPage.class, demoChromeWebEndpoint, harness);
    }

}
