Package org.xwiki.test.ui.po
Class BootstrapSwitch
- java.lang.Object
-
- org.xwiki.test.ui.po.BootstrapSwitch
-
public class BootstrapSwitch extends Object
Wrap a bootstrap switch widget (http://bootstrapswitch.com/).- Since:
- 9.7RC1
- Version:
- $Id: a7eeda215888545e645600a42faac1f37ebbdbc4 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BootstrapSwitch.State
The different states the switch can have.
-
Constructor Summary
Constructors Constructor Description BootstrapSwitch(org.openqa.selenium.WebElement webElement, XWikiWebDriver driver)
Construct a bootstrap switch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
click()
Click on the switch.BootstrapSwitch.State
getState()
boolean
isEnabled()
void
setState(BootstrapSwitch.State wantedState)
Set the state of the switch with the given value.
-
-
-
Constructor Detail
-
BootstrapSwitch
public BootstrapSwitch(org.openqa.selenium.WebElement webElement, XWikiWebDriver driver)
Construct a bootstrap switch.- Parameters:
webElement
- the element the the wrapper will handledriver
- the xwiki web driver
-
-
Method Detail
-
getState
public BootstrapSwitch.State getState()
- Returns:
- the state of the switch
-
click
public void click()
Click on the switch.
-
setState
public void setState(BootstrapSwitch.State wantedState) throws Exception
Set the state of the switch with the given value.- Parameters:
wantedState
- the expected state- Throws:
Exception
- if the expected state cannot be set
-
isEnabled
public boolean isEnabled()
- Returns:
- either or not the input is enabled (meaning we can click on it)
- Since:
- 10.8RC1, 9.11.8
-
-