package ru.yandex.autotests.direct.web.steps;

import ru.yandex.autotests.direct.web.pages.CaptchaPopupBlock;
import ru.yandex.qatools.allure.annotations.Step;
import ru.yandex.qatools.allure.webdriver.steps.BaseSteps;
import ru.yandex.qatools.htmlelements.loader.HtmlElementLoader;

/**
 * @author shmykov
 */
public class CaptchaPopupSteps extends BaseSteps {

    private CaptchaPopupBlock getCaptchaPopupBlock() {
        return HtmlElementLoader.create(CaptchaPopupBlock.class, config.getDriver());
    }

    @Step("Вводим капчу, если она есть")
    public void fillCaptcha() {
        getCaptchaPopupBlock().fillIfDisplayed();
    }
}
