public abstract class AbstractListSelectable extends AbstractSelectable implements IListSelectable
contentObjects, DEFAULT_WAIT_TIMEparent| Constructor and Description |
|---|
AbstractListSelectable(Component parent) |
| 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'.
|
protected Item |
convertToItem(Element element) |
Item[] |
getContent()
Try to get the cached content according to the WebElement.
If no cached content can be found, then get the real-time content by calling AbstractSelectable.getCacheableContent(),and put the content in the cache and return it. If subclass doesn't need this functionality, then just override this method. If subclass needs this functionality, then override method AbstractSelectable.getCacheableContent() |
Item |
getMatchedElement(TextMatchingCriterion criterion)
according to the element's label to get a Element object.
|
protected Item |
getMatchedItem(int index)
according to the index to get a Item 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'.
|
protected void |
verifyItemSelected(Element element)
Note:In subclass, we need to update the 'selected' property of Element.
Please call AbstractSelectable.waitAndVerifyItemSelected(Element) instead to verify selection,as the first method will also try the wait for element to be ready and call EmbeddedObject.refresh(boolean). |
void |
verifyItemSelection(int index,
boolean expectSelected)
Verify the item (specified by index) is selected or un-selected.
|
activateItem, clearCache, clickElement, getCacheableContent, selectItem, showOnPage, verifyContains, verifyItemSelection, verifyItemSelection, waitAndVerifyItemSelected, waitElementReady, waitElementReadyisShowOnPage, isSupported, refresh, webelementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivateItem, selectItem, verifyContains, verifyItemSelectionclearCachegetSupportedClassNamespublic AbstractListSelectable(Component parent) throws SeleniumPlusException
SeleniumPlusExceptionpublic Item[] getContent() throws SeleniumPlusException
AbstractSelectableAbstractSelectable.getCacheableContent(),AbstractSelectable.getCacheableContent()getContent in interface IListSelectablegetContent in interface ISelectablegetContent in class AbstractSelectableSeleniumPlusExceptionAbstractSelectable.getCacheableContent()public Item getMatchedElement(TextMatchingCriterion criterion) throws SeleniumPlusException
ISelectablegetMatchedElement in interface ISelectablecriterion - TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.SeleniumPlusException - if Element cannot be foundprotected Item getMatchedItem(int index) throws SeleniumPlusException
index - int, the index of the item.SeleniumPlusExceptionpublic void selectItem(int index,
boolean verify,
org.openqa.selenium.Keys key,
java.awt.Point offset,
int mouseButtonNumber)
throws SeleniumPlusException
ISelectableselectItem in interface ISelectableindex - 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_RIGHTWDLibrary.MOUSE_BUTTON_MIDDLE.SeleniumPlusExceptionpublic void activateItem(int index,
boolean verify,
org.openqa.selenium.Keys key,
java.awt.Point offset)
throws SeleniumPlusException
ISelectableactivateItem in interface ISelectableindex - 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 atSeleniumPlusExceptionpublic void verifyItemSelection(int index,
boolean expectSelected)
throws SeleniumPlusException
ISelectableverifyItemSelection in interface ISelectableindex - 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.protected Item convertToItem(Element element) throws SeleniumPlusException
SeleniumPlusExceptionprotected void verifyItemSelected(Element element) throws SeleniumPlusException
AbstractSelectableAbstractSelectable.waitAndVerifyItemSelected(Element) instead to verify selection,EmbeddedObject.refresh(boolean).verifyItemSelected in class AbstractSelectableelement - Element, the element to verify that it is selected.SeleniumPlusExceptionCopyright © SAS Institute. All Rights Reserved.