public class InteractiveElement extends Element implements IInteractiveElement
Element.HIGHLIGHT_MODES
Constructor and Description |
---|
InteractiveElement(org.openqa.selenium.By locator) |
InteractiveElement(String locator) |
Modifier and Type | Method and Description |
---|---|
void |
click()
Implementing this method would allow for clicking on the interactive
element
|
void |
clickAndHold()
Implementing this method would allow for clicking on an element and
remaining that way
|
void |
doubleClick()
Implementing this method would allow for double clicking on the
interactive element
|
void |
dragAndDrop(IElement element)
Implementing this method would allow for drag and dropping a specific
element
|
void |
dragAndDropByOffset(int xOffset,
int yOffset)
Implementing this method would allow for drag and dropping by a specific
X/Y offset
|
String |
getLabel()
Throw Unsupported Operation exception if getLabel() on Interactive element is invoked
|
Object |
getValue()
Throw Unsupported Operation exception if getValue() on Interactive element is invoked
|
boolean |
isEnabled()
Returns true if the element is enabled.
|
void |
keyDown(Keys theKey)
Implementing this method would allow for 'pushing' specific key is down
|
void |
keyUp(Keys theKey)
Implementing this method would allow for releasing specific key
|
void |
mouseMove()
Implementing this method would allow for triggering the mouse move event
on this interactive element
|
void |
mouseMoveOut()
Implementing this method would allow for moving the mouse to an area
outside of the element
|
void |
mouseOver()
Implementing this method would allow for moving the mouse over the
element
|
void |
releaseClickAndHold()
Implementing this method would allow for releasing the element that is
being held
|
void |
rightClick()
Implementing this method would allow for right clicking on the
interactive element
|
void |
sendKeys(CharSequence keysToSend)
Implementing this method would allow for sending keys to an element like
the down arrow to a textfield to select a value from the type-ahead or
past input
|
void |
type(String text)
Implementing this method would allow for typing a value to the said
target
|
void |
typeAppend(String text)
Implementing this method would allow for appending to an already typed
value
|
eval, findElement, fireEvent, focusOn, getAttribute, getByLocator, getChildNodesValuesText, getCssValue, getGUIDriver, getInnerHTML, getLocationX, getLocationY, getLocator, getText, getWebElement, hasText, highlight, highlight, highlight, isAttributePresent, isElementNotPresent, isElementNotPresent, isElementPresent, isElementPresent, isElementPresent, isElementVisible, isElementVisible, isWithinBoundsOfWindow, scrollTo, setGUIDriver, waitForAttribute, waitForAttribute, waitForAttributeEqualTo, waitForAttributeEqualTo, waitForAttributeNotEqualTo, waitForAttributeNotEqualTo, waitForCommand, waitForElementNotPresent, waitForElementNotPresent, waitForElementPresent, waitForElementPresent, waitForEnabled, waitForEnabled, waitForNotAttribute, waitForNotAttribute, waitForNotVisible, waitForNotVisible, waitForText, waitForText, waitForVisible, waitForVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
eval, fireEvent, focusOn, getAttribute, getByLocator, getChildNodesValuesText, getCssValue, getInnerHTML, getLocationX, getLocationY, getLocator, getText, getWebElement, hasText, highlight, highlight, isAttributePresent, isElementNotPresent, isElementNotPresent, isElementPresent, isElementPresent, isElementPresent, isElementVisible, isElementVisible, isWithinBoundsOfWindow, scrollTo, waitForAttribute, waitForAttribute, waitForAttributeEqualTo, waitForAttributeEqualTo, waitForAttributeNotEqualTo, waitForAttributeNotEqualTo, waitForElementNotPresent, waitForElementNotPresent, waitForElementPresent, waitForElementPresent, waitForEnabled, waitForEnabled, waitForNotAttribute, waitForNotAttribute, waitForNotVisible, waitForNotVisible, waitForText, waitForText, waitForVisible, waitForVisible
public InteractiveElement(String locator)
locator
- XPath, ID, name, CSS Selector, class name, or tag namepublic InteractiveElement(org.openqa.selenium.By locator)
locator
- an By-expression.public void click() throws WidgetException
IInteractiveElement
click
in interface IInteractiveElement
WidgetException
public void doubleClick() throws WidgetException
IInteractiveElement
doubleClick
in interface IInteractiveElement
WidgetException
public void rightClick() throws WidgetException
IInteractiveElement
rightClick
in interface IInteractiveElement
WidgetException
public boolean isEnabled() throws WidgetException
IElement
isEnabled
in interface IElement
isEnabled
in interface IInteractiveElement
isEnabled
in class Element
WidgetException
public void dragAndDrop(IElement element) throws WidgetException
IInteractiveElement
dragAndDrop
in interface IInteractiveElement
element
- - the element that is to be drag and droppedWidgetException
public void dragAndDropByOffset(int xOffset, int yOffset) throws WidgetException
IInteractiveElement
dragAndDropByOffset
in interface IInteractiveElement
WidgetException
public void keyDown(Keys theKey) throws WidgetException
IInteractiveElement
keyDown
in interface IInteractiveElement
theKey
- - the key to be 'pushed' downWidgetException
public void keyUp(Keys theKey) throws WidgetException
IInteractiveElement
keyUp
in interface IInteractiveElement
theKey
- - the key to be releasedWidgetException
public void clickAndHold() throws WidgetException
IInteractiveElement
clickAndHold
in interface IInteractiveElement
WidgetException
public void releaseClickAndHold() throws WidgetException
IInteractiveElement
releaseClickAndHold
in interface IInteractiveElement
WidgetException
public void sendKeys(CharSequence keysToSend) throws WidgetException
IInteractiveElement
sendKeys
in interface IInteractiveElement
keysToSend
- - the keys to be sent to the interactive elementWidgetException
public void type(String text) throws WidgetException
IInteractiveElement
type
in interface IInteractiveElement
text
- - the text you want typed onto the interactive elementWidgetException
public void typeAppend(String text) throws WidgetException
IInteractiveElement
typeAppend
in interface IInteractiveElement
text
- Text to appendWidgetException
public void mouseMove() throws WidgetException
IInteractiveElement
mouseMove
in interface IInteractiveElement
WidgetException
public void mouseMoveOut() throws WidgetException
IInteractiveElement
mouseMoveOut
in interface IInteractiveElement
WidgetException
public void mouseOver() throws WidgetException
IInteractiveElement
mouseOver
in interface IInteractiveElement
WidgetException
public Object getValue() throws WidgetException
getValue
in interface IReadableElement
WidgetException
public String getLabel() throws WidgetException
getLabel
in interface IReadableElement
WidgetException
Copyright © 2018. All rights reserved.