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_TIME
parent
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 inside 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.This method will be override by sub-class. |
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, verifyItemSelection
activateItem, clearCache, getCacheableContent, selectItem, verifyContains, verifyItemSelection, verifyItemSelection, waitAndVerifyItemSelected, waitElementReady, waitElementReady
isShowOnPage, isSupported, refresh, webelement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activateItem, selectItem, verifyContains, verifyItemSelection
clearCache
public static final java.lang.String CLASS_NAME_LISTBOX
public static final java.lang.String[] supportedClazzes
public SapSelectable_ListBox(Component component) throws SeleniumPlusException
SeleniumPlusException
public java.lang.String[] getSupportedClassNames()
public Item[] getContent() throws SeleniumPlusException
AbstractSelectable
AbstractSelectable.getCacheableContent()
,AbstractSelectable.getCacheableContent()
getContent
in interface IListSelectable
getContent
in interface ISelectable
getContent
in class AbstractListSelectable
SeleniumPlusException
AbstractSelectable.getCacheableContent()
protected void clickElement(Element element, org.openqa.selenium.Keys key, java.awt.Point offset, int mouseButtonNumber, int numberOfClick) throws SeleniumPlusException
AbstractSelectable
EmbeddedObject.refresh(boolean)
.AbstractSelectable.waitAndVerifyItemSelected(Element)
AbstractSelectable.verifyItemSelected(Element)
, as the first method will also try the wait for elementEmbeddedObject.refresh(boolean)
.clickElement
in class AbstractSelectable
element
- 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_RIGHT
WDLibrary.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
AbstractSelectable
EmbeddedObject.isShowOnPage(Element)
firstly.showOnPage
in class AbstractSelectable
element
- Element, the element needs to be visible on pageSeleniumPlusException
#isShowOnPage(Element)}
protected void verifyItemSelected(Element element) throws SeleniumPlusException
AbstractSelectable
AbstractSelectable.waitAndVerifyItemSelected(Element)
instead to verify selection,EmbeddedObject.refresh(boolean)
.verifyItemSelected
in class AbstractListSelectable
element
- Element, the element to verify that it is selected.SeleniumPlusException
Copyright © SAS Institute. All Rights Reserved.