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

com.sdl.selenium.bootstrap.form.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)

The newest version!
package com.sdl.selenium.bootstrap.form;

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.TextField;

/**
 * 

Used for finding element process (to generate xpath address)

*

Example:

*
{@code
 * 
 * }
*

In Java write this:

*
{@code
 * CheckBox checkBox = new CheckBox();
 * checkBox.click();
 * }
*/ public class CheckBox extends TextField implements ICheck { public CheckBox() { setClassName("CheckBox"); setType("checkbox"); } public CheckBox(WebLocator container) { this(); setContainer(container); } public CheckBox(WebLocator container, String label) { this(container); setLabel(label, SearchType.CONTAINS); setLabelPosition("//"); } public CheckBox(String boxLabel, WebLocator container) { this(container); setLabel(boxLabel); } @Override public boolean isChecked() { return executor.isSelected(this); } @Override public boolean isDisabled() { String cls = getAttributeClass(); return (cls != null && cls.contains("disabled")) || getAttribute("disabled") != null; } @Override public boolean isEnabled() { String cls = getAttributeClass(); return (cls != null && !cls.contains("disabled")) || getAttribute("disabled") == null; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy