Class TwinColSelectElement

  • 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 TwinColSelectElement
    extends AbstractSelectElement
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear operation is not supported for select element classes.
      void deselectByText​(String text)
      Deselects the option with the given option text, i.e. removes it from the right side column.
      List<String> getAvailableOptions()
      Gets the available option texts, i.e. all values which have not been selected.
      List<String> getOptions()
      Functionality to find all option texts.
      org.openqa.selenium.WebElement getOptionsElement()
      Gets the left <select> element inside the component, containing the available options.
      org.openqa.selenium.WebElement getSelectionsElement()
      Gets the right <select> element inside the component, containing the selected options.
      String getValue()
      Return first selected item (item in the right part of component).
      List<String> getValues()
      Functionality to find option texts of all currently selected options.
      protected void init()  
      void selectByText​(String text)
      Selects the option with the given option text, i.e. adds it to the right side column.
      • Methods inherited from class com.vaadin.testbench.TestBenchElement

        click, 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, 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

      • TwinColSelectElement

        public TwinColSelectElement()
    • Method Detail

      • init

        protected void init()
        Overrides:
        init in class com.vaadin.testbench.TestBenchElement
      • deselectByText

        public void deselectByText​(String text)
        Deselects the option with the given option text, i.e. removes it from the right side column.
        Parameters:
        text - the text of the option to deselect
      • getValues

        public List<String> getValues()
        Functionality to find option texts of all currently selected options.
        Returns:
        List of visible text for all selected options
      • getOptions

        public List<String> getOptions()
        Functionality to find all option texts.
        Returns:
        List of visible text for all options
      • getAvailableOptions

        public List<String> getAvailableOptions()
        Gets the available option texts, i.e. all values which have not been selected.
        Returns:
        List of visible text for available options
      • selectByText

        public void selectByText​(String text)
        Selects the option with the given option text, i.e. adds it to the right side column.
        Parameters:
        text - the text of the option to select
      • getValue

        public String getValue()
        Return first selected item (item in the right part of component).
        Returns:
        the option text for the item
      • clear

        public void clear()
        Description copied from class: AbstractSelectElement
        Clear operation is not supported for select element classes. This operation has no effect on select element
        Specified by:
        clear in interface org.openqa.selenium.WebElement
        Overrides:
        clear in class AbstractSelectElement
      • getOptionsElement

        public org.openqa.selenium.WebElement getOptionsElement()
        Gets the left <select> element inside the component, containing the available options.
        Returns:
        the select element containing options inside the component
        Since:
        8.1.1
      • getSelectionsElement

        public org.openqa.selenium.WebElement getSelectionsElement()
        Gets the right <select> element inside the component, containing the selected options.
        Returns:
        the select element containing selection inside the component
        Since:
        8.1.1