-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathCheckboxesPage.java
More file actions
30 lines (23 loc) · 869 Bytes
/
CheckboxesPage.java
File metadata and controls
30 lines (23 loc) · 869 Bytes
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
26
27
28
29
30
package theinternet.pages;
import com.frameworkium.core.htmlelements.element.CheckBox;
import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import io.qameta.allure.Step;
import org.openqa.selenium.support.FindBy;
import java.util.List;
import java.util.stream.Stream;
public class CheckboxesPage extends BasePage<CheckboxesPage> {
@Visible
@FindBy(css = "form input[type='checkbox']")
private List<CheckBox> allCheckboxes;
@Step("Set all the checkboxes to true")
public CheckboxesPage checkAllCheckboxes() {
allCheckboxes.forEach(CheckBox::select);
return this;
}
@Step("Return the checked status of all the checkboxes")
public Stream<Boolean> getAllCheckboxCheckedStatus() {
return allCheckboxes.stream()
.map(CheckBox::isSelected);
}
}