summaryrefslogtreecommitdiff
path: root/src/main/java/com/mavlushechka/a1qa/pages/HelpForm.java
blob: 30b3801c7e292f04d4fe63c29c10dfa7cb00da69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.mavlushechka.a1qa.pages;

import com.mavlushechka.a1qa.elements.Button;
import com.mavlushechka.a1qa.elements.Label;
import org.openqa.selenium.By;

public class HelpForm extends BaseForm {

    private final Button hideButton = new Button(By.xpath("//*[contains(@class, 'help-form')]//*[contains(@class, 'help-form__send-to-bottom-button')]"), "Hide help form");
    private final Label title = new Label(By.xpath("//*[contains(@class, 'help-form__title')]"), "Help form title");


    public HelpForm() {
        super(new Label(By.xpath("//*[contains(@class, 'help-form') and not(contains(@class, 'help-form__'))]"), "Help form"), "Help form");
    }

    public void hide() {
        hideButton.click();
    }

    public boolean isHidden() {
        return title.isInvisible();
    }

}