Class Select

  • All Implemented Interfaces:
    org.openqa.selenium.support.ui.ISelect, org.openqa.selenium.WrapsElement

    public class Select
    extends org.openqa.selenium.support.ui.Select
    Extends Select in order to fix some bugs. Note that this select might not be work properly within modals since it's hitting Escape key which close the modal by default.
    Since:
    6.0M1
    Version:
    $Id: f8356abfcc1e7ca9e00e01066e0821fa1e55d28d $
    • Constructor Detail

      • Select

        public Select​(org.openqa.selenium.WebElement element)
        Constructor. A check is made that the given element is, indeed, a SELECT tag. If it is not, then an UnexpectedTagNameException is thrown.
        Parameters:
        element - SELECT element to wrap
        Throws:
        org.openqa.selenium.support.ui.UnexpectedTagNameException - when element is not a SELECT
    • Method Detail

      • selectByIndex

        public void selectByIndex​(int index)
        Specified by:
        selectByIndex in interface org.openqa.selenium.support.ui.ISelect
        Overrides:
        selectByIndex in class org.openqa.selenium.support.ui.Select
      • selectByValue

        public void selectByValue​(String value)
        Specified by:
        selectByValue in interface org.openqa.selenium.support.ui.ISelect
        Overrides:
        selectByValue in class org.openqa.selenium.support.ui.Select
      • selectByVisibleText

        public void selectByVisibleText​(String text)
        Specified by:
        selectByVisibleText in interface org.openqa.selenium.support.ui.ISelect
        Overrides:
        selectByVisibleText in class org.openqa.selenium.support.ui.Select