package ru.otus.mobile.component;

import com.codeborne.selenide.SelenideElement;

public final class WishlistFormComponent extends BaseMobileComponent {
    private final SelenideElement titleInput = byIdInRoot("title_input");
    private final SelenideElement saveButton = byIdInRoot("save_button");

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

    public void save(String title) {
        titleInput.click();
        titleInput.clear();
        titleInput.sendKeys(title);
        saveButton.click();
    }
}
