com.vaadin.flow.component.textfield.testbench.

Class IntegerFieldElement

java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.textfield.testbench.IntegerFieldElement

All Implemented Interfaces:

CanCompareScreenshots, HasCallFunction, HasDriver, HasElementQuery, HasHelper, HasLabel, HasPlaceholder, HasPropertySettersGetters, HasSearchContext, HasStringValueProperty, HasTestBenchCommandExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

public class IntegerFieldElement extends TestBenchElement implements HasStringValueProperty, HasLabel, HasPlaceholder, HasHelper

A TestBench element representing a <vaadin-integer-field> element.

  • Constructor Details

    • IntegerFieldElement

      public IntegerFieldElement()
  • Method Details

    • setValue

      public void setValue(String string)

      Emulates the user setting the value. This triggers server value change listeners and validation. The emulation is done by setting the value property of the input element to the given value and then triggering synthetic input, change, and focusout DOM events.

      For more complex scenarios that require a full browser simulation of typing, use sendKeys(CharSequence...) instead.

      WARNING: This method does not support values that aren't parsable into an integer. If you need to enter such values e.g. to test the validation workflow, use sendKeys(CharSequence...) instead.

      Specified by:

      setValue in interface HasStringValueProperty

      Parameters:

      string - the value to set

    • sendKeys

      public void sendKeys(CharSequence... keysToSend)

      Specified by:

      sendKeys in interface org.openqa.selenium.WebElement

      Overrides:

      sendKeys in class TestBenchElement