package cz.moneta.test.dsl.broadcom;

import cz.moneta.test.harness.support.web.Click;
import cz.moneta.test.harness.support.web.TypeInto;
import cz.moneta.test.harness.support.web.Wait;
import cz.moneta.test.harness.support.web.WebFlow;

import static cz.moneta.test.dsl.broadcom.BroadcomLoginPage.USERNAME_INPUT;

@Wait(USERNAME_INPUT)
public interface BroadcomLoginPage extends WebFlow<BroadcomLoginPage> {
    String USERNAME_INPUT = "//input[@name='adminname']";
    String PASSWORD_INPUT = "//input[@name='password']";
    String LOGIN_BUTTON = "//input[@name='Submit']";

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