Class PasswordFieldElement

java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.textfield.testbench.PasswordFieldElement
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 PasswordFieldElement extends TestBenchElement implements HasStringValueProperty, HasLabel, HasPlaceholder, HasHelper
A TestBench element representing a <vaadin-password-field> element.
  • Constructor Details

    • PasswordFieldElement

      public PasswordFieldElement()
  • Method Details

    • isPasswordVisible

      public boolean isPasswordVisible()
      Checks whether the password is shown in clear text or is hidden from view.
      Returns:
      true if the password is shown in clear text, false if it is hidden from view
    • setPasswordVisible

      public void setPasswordVisible(boolean passwordVisible)
      Sets whether the password should be shown in clear text or be hidden from view.
      Parameters:
      passwordVisible - true to show the password in clear text, false to hide the password from view
    • setValue

      public void setValue(String string)
      Emulates the user changing the value, which in practice means setting value of the input element to the given value and then triggering input, change and focusout DOM events.
      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