protected static class ListView.SapSelectable_ListBox extends AbstractListSelectable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_NAME_LISTBOX |
static java.lang.String[] |
supportedClazzes |
contentObjects, DEFAULT_WAIT_TIMEparent| Constructor and Description |
|---|
SapSelectable_ListBox(Component component) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clickElement(Element element,
org.openqa.selenium.Keys key,
java.awt.Point offset,
int mouseButtonNumber,
int numberOfClick)
Try to get the Selenium WebElement object from parameter 'element', then click that WebElement object.
After calling this method, the parent of Element may become stale. |
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() |
java.lang.String[] |
getSupportedClassNames() |
protected void |
showOnPage(Element element)
Make the element is in the container, and visible on the page.
For example, some element may not be visible if there are too many elements in its container; User can scroll to make the element visible on the page. User may need to wait for a while so that the element related object can be updated (like position-onscreen, visibility etc.) This method gives a default implementation: it will scroll and align the top of element to the top of container. Before this method is called, it is suggested to call EmbeddedObject.isShowOnPage(Element) firstly. |
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). |
activateItem, convertToItem, getMatchedElement, getMatchedItem, selectItem, verifyItemSelectionactivateItem, clearCache, getCacheableContent, selectItem, verifyContains, verifyItemSelection, verifyItemSelection, waitAndVerifyItemSelected, waitElementReady, waitElementReadyisShowOnPage, isSupported, refresh, webelementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivateItem, selectItem, verifyContains, verifyItemSelectionclearCachepublic static final java.lang.String CLASS_NAME_LISTBOX
public static final java.lang.String[] supportedClazzes
public SapSelectable_ListBox(Component component) throws SeleniumPlusException
SeleniumPlusExceptionpublic java.lang.String[] getSupportedClassNames()
public Item[] getContent() throws SeleniumPlusException
AbstractSelectableAbstractSelectable.getCacheableContent(),AbstractSelectable.getCacheableContent()getContent in interface IListSelectablegetContent in interface ISelectablegetContent in class AbstractListSelectableSeleniumPlusExceptionAbstractSelectable.getCacheableContent()protected void clickElement(Element element, org.openqa.selenium.Keys key, java.awt.Point offset, int mouseButtonNumber, int numberOfClick) throws SeleniumPlusException
AbstractSelectableEmbeddedObject.refresh(boolean).AbstractSelectable.waitAndVerifyItemSelected(Element)AbstractSelectable.verifyItemSelected(Element), as the first method will also try the wait for elementEmbeddedObject.refresh(boolean).clickElement in class AbstractSelectableelement - Element, the element to selectkey - 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.
it can be WDLibrary.MOUSE_BUTTON_LEFT or WDLibrary.MOUSE_BUTTON_RIGHTWDLibrary.MOUSE_BUTTON_MIDDLE.numberOfClick - int, 1 means single-click, 2 means double-clickSeleniumPlusException#refresh(boolean)},
AbstractSelectable.waitAndVerifyItemSelected(Element)protected void showOnPage(Element element) throws SeleniumPlusException
AbstractSelectableEmbeddedObject.isShowOnPage(Element) firstly.showOnPage in class AbstractSelectableelement - Element, the element needs to be visible on pageSeleniumPlusException#isShowOnPage(Element)}protected void verifyItemSelected(Element element) throws SeleniumPlusException
AbstractSelectableAbstractSelectable.waitAndVerifyItemSelected(Element) instead to verify selection,EmbeddedObject.refresh(boolean).verifyItemSelected in class AbstractListSelectableelement - Element, the element to verify that it is selected.SeleniumPlusExceptionCopyright © SAS Institute. All Rights Reserved.