Class SwitchLocator
java.lang.Object
com.vaadin.browserless.locator.Locator<Switch,SwitchLocator>
com.vaadin.flow.component.checkbox.SwitchLocator
- All Implemented Interfaces:
Clickable<Switch>,HasAriaLabelFilter<Switch,,SwitchLocator> HasLabelFilter<Switch,,SwitchLocator> HasThemeFilter<Switch,,SwitchLocator> HasValueFilter<Switch,Boolean, SwitchLocator>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class SwitchLocator
extends Locator<Switch,SwitchLocator>
implements Clickable<Switch>, HasLabelFilter<Switch,SwitchLocator>, HasAriaLabelFilter<Switch,SwitchLocator>, HasValueFilter<Switch,Boolean,SwitchLocator>, HasThemeFilter<Switch,SwitchLocator>
Generated locator for
Switch, derived from
SwitchTester. Filter steps are inherited from
Locator; action methods delegate to a fresh tester
around the resolved component, so behavioral changes belong on the
tester, not here.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDelegates toSwitchTester.click(int,com.vaadin.browserless.MetaKeys).voidEnsures the component is in a usable state before interaction.Gets the component being tested.booleanisOn()Checks whether the switch is currently on.voidSwitches the switch off by clicking it, as a user would.voidswitchOn()Switches the switch on by clicking it, as a user would.Methods inherited from class com.vaadin.browserless.locator.Locator
atIndex, component, components, exists, inside, inside, invalidate, self, with, withAttribute, withAttribute, withClassName, withCondition, withId, withinSlot, withoutAttribute, withoutAttribute, withoutClassName, withTestIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.browserless.Clickable
click, click, middleClick, middleClick, rightClick, rightClickMethods inherited from interface com.vaadin.browserless.locator.HasAriaLabelFilter
withAriaLabel, withAriaLabelContainingMethods inherited from interface com.vaadin.browserless.locator.HasLabelFilter
withLabel, withLabelContainingMethods inherited from interface com.vaadin.browserless.locator.HasThemeFilter
withoutTheme, withoutTheme, withTheme, withThemeMethods inherited from interface com.vaadin.browserless.locator.HasValueFilter
withValue
-
Constructor Details
-
SwitchLocator
public SwitchLocator() -
SwitchLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<Switch>- Returns:
- the component under test
-
ensureComponentIsUsable
public void ensureComponentIsUsable()Description copied from interface:ClickableEnsures the component is in a usable state before interaction.- Specified by:
ensureComponentIsUsablein interfaceClickable<Switch>
-
isOn
public boolean isOn()Checks whether the switch is currently on. Javadoc copied fromSwitchTester.isOn().- Returns:
trueif the switch is on,falseotherwise
-
switchOn
public void switchOn()Switches the switch on by clicking it, as a user would.Does nothing if the switch is already on, since a user would not click it in that case. The switch must be usable either way. Javadoc copied from
SwitchTester.switchOn(). -
switchOff
public void switchOff()Switches the switch off by clicking it, as a user would.Does nothing if the switch is already off, since a user would not click it in that case. The switch must be usable either way. Javadoc copied from
SwitchTester.switchOff(). -
click
Delegates toSwitchTester.click(int,com.vaadin.browserless.MetaKeys).
-