All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sdl.selenium.materialui.checkbox.Checkbox Maven / Gradle / Ivy

Go to download

Automated Acceptance Testing. Selenium and Selenium WebDriver test framework for web applications. (optimized for dynamic html, ExtJS, Bootstrap, complex UI, simple web applications/sites)

There is a newer version: 20.08.432.0_b2d2a09
Show newest version
package com.sdl.selenium.materialui.checkbox;

import com.sdl.selenium.web.SearchType;
import com.sdl.selenium.web.WebLocator;
import com.sdl.selenium.web.form.ICheck;
import com.sdl.selenium.web.form.IField;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Checkbox extends WebLocator implements IField, ICheck {

    public Checkbox() {
        setClassName("Checkbox");
        setType("checkbox");
        setTag("input");
        setLabelTag("span");
        setLabelPosition("/preceding-sibling::*//");
    }

    public Checkbox(WebLocator container) {
        this();
        setContainer(container);
    }

    public Checkbox(WebLocator container, String label, SearchType... searchTypes) {
        this(container);
        if (searchTypes.length == 0) {
            searchTypes = new SearchType[]{SearchType.EQUALS};
        }
        setLabel(label, searchTypes);
    }

    @Override
    public boolean isChecked() {
        return ready() && executor.isSelected(this);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy