public interface ISelectable extends IOperable
Apr 25, 2014 (Lei Wang) Initial release. May 05, 2014 (Lei Wang) Modify methods selectItem and verifyItemSelection to accept one more parameter 'matchIndex'. May 05, 2014 (Lei Wang) Modify methods selectItem to accept one more parameter 'key'. May 29, 2014 (Lei Wang) Modify methods selectItem to accept more parameter 'offset' and 'mouseButtonNumber'. Add methods activateItem to double click item.
Modifier and Type | Method and Description |
---|---|
void |
activateItem(int index,
boolean verify,
org.openqa.selenium.Keys key,
java.awt.Point offset)
Try to activate (double-click) the item according to the index, and then verify if the item
has been really selected according to the parameter 'verify'.
|
void |
activateItem(TextMatchingCriterion criterion,
boolean verify,
org.openqa.selenium.Keys key,
java.awt.Point offset)
Try to activate (double-click) the item according to the item's text (fully or partially given),
and then verify if the item has been really selected according to the parameter 'verify'.
|
Element[] |
getContent()
Get all elements.
|
Element |
getMatchedElement(TextMatchingCriterion criterion)
according to the element's label to get a Element object.
|
void |
selectItem(int index,
boolean verify,
org.openqa.selenium.Keys key,
java.awt.Point offset,
int mouseButtonNumber)
Try to select (single-click) the item according to the index, and then verify if the item
has been really selected according to the parameter 'verify'.
|
void |
selectItem(TextMatchingCriterion criterion,
boolean verify,
org.openqa.selenium.Keys key,
java.awt.Point offset,
int mouseButtonNumber)
Try to select (single-click) the item according to the item's text (fully or partially given),
and then verify if the item has been really selected according to the parameter 'verify'.
|
void |
verifyContains(TextMatchingCriterion criterion)
Verify the item (specified by text, partialMatch and matchIndex) is contained.
|
void |
verifyItemSelection(int index,
boolean expectSelected)
Verify the item (specified by index) is selected or un-selected.
|
void |
verifyItemSelection(TextMatchingCriterion criterion,
boolean expectSelected)
Verify the item (specified by text, partialMatch and matchIndex) is selected or un-selected.
|
clearCache
void selectItem(TextMatchingCriterion criterion, boolean verify, org.openqa.selenium.Keys key, java.awt.Point offset, int mouseButtonNumber) throws SeleniumPlusException
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.verify
- boolean, if true then verify the selection;key
- org.openqa.selenium.Keys, it is the key to press during selection.Keys.SHIFT
, or Keys.CONTROL
.offset
- Point, the position relative to the up-left corner to click atmouseButtonNumber
- int, the mouse-button-number representing right, middle, or left button.WDLibrary.MOUSE_BUTTON_LEFT
or WDLibrary.MOUSE_BUTTON_RIGHT
WDLibrary.MOUSE_BUTTON_MIDDLE
.SeleniumPlusException
void selectItem(int index, boolean verify, org.openqa.selenium.Keys key, java.awt.Point offset, int mouseButtonNumber) throws SeleniumPlusException
index
- int, the index of the item to select, it is 0-based index.verify
- boolean, if true then verify the selection;key
- org.openqa.selenium.Keys, it is the key to press during selection.Keys.SHIFT
, or Keys.CONTROL
.offset
- Point, the position relative to the up-left corner to click atmouseButtonNumber
- int, the mouse-button-number representing right, middle, or left button.WDLibrary.MOUSE_BUTTON_LEFT
or WDLibrary.MOUSE_BUTTON_RIGHT
WDLibrary.MOUSE_BUTTON_MIDDLE
.SeleniumPlusException
void activateItem(TextMatchingCriterion criterion, boolean verify, org.openqa.selenium.Keys key, java.awt.Point offset) throws SeleniumPlusException
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.verify
- boolean, if true then verify the selection;key
- org.openqa.selenium.Keys, it is the key to press during selection.Keys.SHIFT
, or Keys.CONTROL
.offset
- Point, the position relative to the up-left corner to click atSeleniumPlusException
void activateItem(int index, boolean verify, org.openqa.selenium.Keys key, java.awt.Point offset) throws SeleniumPlusException
index
- int, the index of the item to select, it is 0-based index.verify
- boolean, if true then verify the selection;key
- org.openqa.selenium.Keys, it is the key to press during selection.Keys.SHIFT
, or Keys.CONTROL
.offset
- Point, the position relative to the up-left corner to click atSeleniumPlusException
void verifyItemSelection(TextMatchingCriterion criterion, boolean expectSelected) throws SeleniumPlusException
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.expectSelected
- boolean, true if the item is expected 'selected'; false if expected 'unselected'.SeleniumPlusException
- if the verification fails.void verifyItemSelection(int index, boolean expectSelected) throws SeleniumPlusException
index
- int, the index of the item to select, it is 0-based index.expectSelected
- boolean, true if the item is expected 'selected'; false if expected 'unselected'.SeleniumPlusException
- if the verification fails.void verifyContains(TextMatchingCriterion criterion) throws SeleniumPlusException
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.SeleniumPlusException
- if the verification fails.Element getMatchedElement(TextMatchingCriterion criterion) throws SeleniumPlusException
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.SeleniumPlusException
- if Element cannot be foundElement[] getContent() throws SeleniumPlusException
SeleniumPlusException
Copyright © SAS Institute. All Rights Reserved.