package cz.moneta.test.dsl.fortelight.pages.intermediary;

import cz.moneta.test.dsl.fortelight.ForteLightPageFlow;
import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.fortelight.pages.intermediary.ImportdealerPage.PAGE_TITLE;

@Wait(PAGE_TITLE)
public interface ImportdealerPage extends ForteLightPageFlow<ImportdealerPage> {
    String CONTENT_DIV = "//div[@class='content_data']";
    String PAGE_TITLE = CONTENT_DIV + "//h3[starts-with(text(), 'Nahrát soubor')]";
    String IMPORT_FORM = "//form[@id='frm-uploadForm-upload-upload']";
    String FILE_UPLOAD = IMPORT_FORM + "//input[@name='file']";
    String ADD_BUTTON = IMPORT_FORM + "//input[@name='add']";

    @CheckElementContent(PAGE_TITLE)
    ImportdealerPage checkPageTitle(String pageTitle);

    @FileUpload(value = FILE_UPLOAD, by = Lookup.XPATH)
    ImportdealerPage uploadDocument(String DOC_PATH);

    @Click(value = ADD_BUTTON, by = Lookup.XPATH)
    ImportdealercheckPage clickUploadButton();
}