package cz.moneta.test.dsl.kasanova;

import cz.moneta.test.harness.endpoints.WebEndpoint;
import cz.moneta.test.harness.support.web.Lookup;
import cz.moneta.test.harness.support.web.Until;
import cz.moneta.test.harness.support.web.WebFlow;

public interface KSNPageFlow<A extends WebFlow<A>> extends WebFlow<A>, KSNCommonElements {
    
    static void loadLocalPage(WebEndpoint endpoint, String element){
        endpoint.switchToDefaultContent();
        endpoint.waitForElementsToLoad(20, Lookup.XPATH, MAIN_IFRAME_XPATH);
        endpoint.switchToFrame(MAIN_IFRAME_NAME);
        endpoint.waitForElementsToLoad(80, Until.GONE, LOADER_DIV);
        endpoint.waitForElementsToLoad(20, element);
    }
}
