Class RangeSlider

All Implemented Interfaces:
SpecificConditionHandler, ByLocator, SelenideElementWrapper<RangeSlider>

public class RangeSlider extends AbstractSlider<RangeSlider>
Web-element wrapper for range slider. Also, can be used for wrapping range-slider-like web-elements: integerRangeSlider, decimalRangeSlider. Supports setting start and end values and RangeValue condition checking.

A range slider has two values, so the Value and ValueContains conditions are not supported: use the RangeValue condition to check both range bounds.

  • Field Details

  • Constructor Details

    • RangeSlider

      public RangeSlider(org.openqa.selenium.By by)
  • Method Details

    • resolve

      public SpecificCheck resolve(SpecificCondition condition)
      Description copied from interface: SpecificConditionHandler
      Resolves the passed SpecificCondition into a SpecificCheck that describes how it must be checked for the current handler. The actual verdict is computed centrally by SpecificCondition.check(com.codeborne.selenide.Driver, org.openqa.selenium.WebElement).
      Specified by:
      resolve in interface SpecificConditionHandler
      Overrides:
      resolve in class AbstractField<RangeSlider>
      Parameters:
      condition - condition to resolve
      Returns:
      a SpecificCheck describing how to check the passed condition
    • setValue

      public RangeSlider setValue(String startValue, String endValue)
      Sets the start and end values to the range slider.

      A range slider limits its start value by the current end value and vice versa, so the bounds are set in the order that keeps the intermediate range valid.

      Parameters:
      startValue - start value as a string presentation value
      endValue - end value as a string presentation value
      Returns:
      this to call fluent API
    • setStartValue

      public RangeSlider setStartValue(String value)
      Sets the start value to the range slider. The value is limited by the current end value.
      Parameters:
      value - start value as a string presentation value
      Returns:
      this to call fluent API
    • setEndValue

      public RangeSlider setEndValue(String value)
      Sets the end value to the range slider. The value is limited by the current start value.
      Parameters:
      value - end value as a string presentation value
      Returns:
      this to call fluent API
    • isAboveCurrentEndValue

      protected boolean isAboveCurrentEndValue(String startValue)
    • getStartValue

      protected String getStartValue()
    • getEndValue

      protected String getEndValue()
    • getStartInputDelegate

      protected com.codeborne.selenide.SelenideElement getStartInputDelegate()
      Returns:
      SelenideElement of a start value input web-element
    • getEndInputDelegate

      protected com.codeborne.selenide.SelenideElement getEndInputDelegate()
      Returns:
      SelenideElement of an end value input web-element
    • getInputDelegate

      protected com.codeborne.selenide.SelenideElement getInputDelegate(int index)