package cz.moneta.test.dsl.salesforce.pages;

import cz.moneta.test.harness.support.web.*;

import static cz.moneta.test.dsl.salesforce.pages.LoginPage.*;

@Wait(value = {USERNAME_INPUT, PASSWORD_INPUT, LOGIN_INPUT}, until = Until.VISIBLE)
public interface LoginPage extends WebFlow<LoginPage> {
    String USERNAME_INPUT = "//input[@id='username']";
    String PASSWORD_INPUT = "//input[@id='password']";
    String LOGIN_INPUT = "//input[@id='Login']";

    @TypeInto(value = USERNAME_INPUT, clear = true)
    @TypeInto(value = PASSWORD_INPUT, clear = true)
    @Click(LOGIN_INPUT)
    MainPage loginWithUsernameAndPassword(String username, String password);
}
