package ru.otus.mobile.component;

import com.codeborne.selenide.SelenideElement;

public final class UsersFilterComponent extends BaseMobileComponent {
    private final SelenideElement usernameInput = byIdInRoot("username_input");
    private final SelenideElement applyButton = byIdInRoot("apply_button");

    public UsersFilterComponent(SelenideElement root) {
        super(root);
    }

    public void applyByUsername(String username) {
        usernameInput.click();
        usernameInput.clear();
        usernameInput.sendKeys(username);
        applyButton.click();
    }
}
