Class CheckBoxElement

  • All Implemented Interfaces:
    com.vaadin.testbench.commands.CanCompareScreenshots, com.vaadin.testbench.commands.CanWaitForVaadin, com.vaadin.testbench.commands.TestBenchElementCommands, com.vaadin.testbench.HasDriver, com.vaadin.testbench.HasSearchContext, com.vaadin.testbench.HasTestBenchCommandExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

    public class CheckBoxElement
    extends AbstractFieldElement
    • Constructor Summary

      Constructors 
      Constructor Description
      CheckBoxElement()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clears the check box, setting unchecked value.
      void click()  
      String getCaption()
      Returns the caption of the Component element.
      org.openqa.selenium.WebElement getInputElement()
      Gets the <input> element of the checkbox.
      String getValue()
      Return string representation of value of the checkbox Return either checked or unchecked.
      boolean isChecked()
      Checks if the checkbox is checked.
      • Methods inherited from class com.vaadin.testbench.TestBenchElement

        click, clickHiddenElement, compareScreen, compareScreen, compareScreen, contextClick, doubleClick, equals, findElement, findElements, focus, getAccessibleName, getAriaRole, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDomAttribute, getDriver, getId, getLocation, getRect, getScreenshotAs, getShadowRoot, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isFocused, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, showTooltip, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
      • Methods inherited from class com.vaadin.testbench.AbstractHasTestBenchCommandExecutor

        $, $$, isElementPresent, isElementPresent
      • Methods inherited from interface org.openqa.selenium.WebElement

        getDomProperty
    • Constructor Detail

      • CheckBoxElement

        public CheckBoxElement()
    • Method Detail

      • getValue

        public String getValue()
        Return string representation of value of the checkbox Return either checked or unchecked.
      • isChecked

        public boolean isChecked()
        Checks if the checkbox is checked.
        Returns:
        true if the checkbox is checked, false otherwise.
      • clear

        public void clear()
        Clears the check box, setting unchecked value. The check box is unchecked by sending a click event on it.
        Specified by:
        clear in interface org.openqa.selenium.WebElement
        Overrides:
        clear in class com.vaadin.testbench.TestBenchElement
      • click

        public void click()
        Specified by:
        click in interface org.openqa.selenium.WebElement
        Overrides:
        click in class com.vaadin.testbench.TestBenchElement
      • getInputElement

        public org.openqa.selenium.WebElement getInputElement()
        Gets the <input> element of the checkbox.
        Returns:
        the input element