Class RadioButtonUtils

java.lang.Object
uk.co.evoco.webdriver.utils.TolerantInteraction
uk.co.evoco.webdriver.utils.RadioButtonUtils

public final class RadioButtonUtils
extends TolerantInteraction
Utility methods to select radio buttons
  • Constructor Summary

    Constructors 
    Constructor Description
    RadioButtonUtils()  
  • Method Summary

    Modifier and Type Method Description
    static void selectByLabel​(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleLabelText)
    Given a list of WebElements that locate the labels of the radio buttons, finds the radio button with the given visible label text and selects it.
    static void tolerantSelectByLabel​(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleLabelText)  
    static void tolerantSelectByLabel​(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleLabelText, int timeout)  

    Methods inherited from class uk.co.evoco.webdriver.utils.TolerantInteraction

    tolerantInteraction, tolerantInteraction, tolerantInteraction

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • selectByLabel

      public static void selectByLabel​(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleLabelText)
      Given a list of WebElements that locate the labels of the radio buttons, finds the radio button with the given visible label text and selects it.
      Parameters:
      webElements - active WebElements, already located
      visibleLabelText - text that is visible on the page in the label tags
    • tolerantSelectByLabel

      public static void tolerantSelectByLabel​(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleLabelText, int timeout) throws java.lang.Throwable
      Parameters:
      webElements - active WebElements, already located
      visibleLabelText - text that is visible on the page in the label tags
      timeout - time in seconds to keep trying
      Throws:
      java.lang.Throwable - any unhandled or un-tolerated exception
    • tolerantSelectByLabel

      public static void tolerantSelectByLabel​(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleLabelText) throws java.lang.Throwable
      Parameters:
      webElements - active WebElements, already located
      visibleLabelText - text that is visible on the page in the label tags
      Throws:
      java.lang.Throwable - any unhandled or un-tolerated exception