Interface ElementActionsContract
- All Known Implementing Classes:
Actions, ElementActions, ElementActions
public interface ElementActionsContract
Public contract for element-level SHAFT actions.
-
Method Summary
Modifier and TypeMethodDescriptionand()default StringariaSnapshot(ShaftLocator elementLocator) ariaSnapshot(org.openqa.selenium.By elementLocator) Captures an accessible-name-tree ("aria") snapshot of the target element, serialized as YAML.default ElementAssertionsassertThat(ShaftLocator elementLocator) assertThat(org.openqa.selenium.By elementLocator) default ElementActionsContractcaptureScreenshot(ShaftLocator elementLocator) captureScreenshot(org.openqa.selenium.By elementLocator) default ElementActionsContractclear(ShaftLocator elementLocator) clear(org.openqa.selenium.By elementLocator) default ElementActionsContractclick(ShaftLocator elementLocator) default ElementActionsContractClicks a clickable element resolved by visible text, label, or accessible name.click(org.openqa.selenium.By elementLocator) default ElementActionsContractclickAndHold(ShaftLocator elementLocator) clickAndHold(org.openqa.selenium.By elementLocator) default ElementActionsContractclickUsingJavascript(ShaftLocator elementLocator) clickUsingJavascript(org.openqa.selenium.By elementLocator) default ElementActionsContractdoubleClick(ShaftLocator elementLocator) doubleClick(org.openqa.selenium.By elementLocator) default ElementActionsContractdragAndDrop(ShaftLocator sourceElementLocator, ShaftLocator destinationElementLocator) dragAndDrop(org.openqa.selenium.By sourceElementLocator, org.openqa.selenium.By destinationElementLocator) default ElementActionsContractdragAndDropByOffset(ShaftLocator sourceElementLocator, int xOffset, int yOffset) dragAndDropByOffset(org.openqa.selenium.By sourceElementLocator, int xOffset, int yOffset) executeNativeMobileCommand(String command, Map<String, String> parameters) default intgetElementsCount(ShaftLocator elementLocator) intgetElementsCount(org.openqa.selenium.By elementLocator) getTableRowsData(ShaftLocator tableLocator) getTableRowsData(org.openqa.selenium.By tableLocator) default ElementActionsContracthover(ShaftLocator elementLocator) hover(org.openqa.selenium.By elementLocator) hoverAndClick(List<org.openqa.selenium.By> hoverElementLocators, org.openqa.selenium.By clickableElementLocator) default ElementActionsContractscrollToElement(ShaftLocator elementLocator) scrollToElement(org.openqa.selenium.By elementLocator) default ElementActionsContractselect(ShaftLocator elementLocator, String valueOrVisibleText) default ElementActionsContractsetValueUsingJavaScript(ShaftLocator elementLocator, String value) setValueUsingJavaScript(org.openqa.selenium.By elementLocator, String value) default ElementActionsContractsubmitFormUsingJavaScript(ShaftLocator elementLocator) submitFormUsingJavaScript(org.openqa.selenium.By elementLocator) default ElementActionsContractswitchToIframe(ShaftLocator elementLocator) switchToIframe(org.openqa.selenium.By elementLocator) default ElementActionsContractSwitches focus from the current iframe to its parent frame.default ElementActionsContracttype(ShaftLocator elementLocator, CharSequence... text) default ElementActionsContracttype(String elementName, CharSequence... text) Types into an input resolved by visible label, placeholder, or accessible name.type(org.openqa.selenium.By elementLocator, CharSequence... text) default ElementActionsContracttypeAppend(ShaftLocator elementLocator, CharSequence... text) typeAppend(org.openqa.selenium.By elementLocator, CharSequence... text) default ElementActionsContracttypeFileLocationForUpload(ShaftLocator elementLocator, String filePath) typeFileLocationForUpload(org.openqa.selenium.By elementLocator, String filePath) default ElementActionsContracttypeSecure(ShaftLocator elementLocator, CharSequence... text) typeSecure(org.openqa.selenium.By elementLocator, CharSequence... text) default ElementAssertionsverifyThat(ShaftLocator elementLocator) verifyThat(org.openqa.selenium.By elementLocator)
-
Method Details
-
and
ElementActionsContract and() -
assertThat
-
verifyThat
-
assertThat
-
verifyThat
-
getElementsCount
int getElementsCount(org.openqa.selenium.By elementLocator) -
getElementsCount
-
executeNativeMobileCommand
-
click
-
click
Clicks a clickable element resolved by visible text, label, or accessible name.- Parameters:
elementName- the visible text, label, or accessible name of the target element- Returns:
- a self-reference to be used to chain actions
-
click
-
clickUsingJavascript
-
clickUsingJavascript
-
scrollToElement
-
scrollToElement
-
clickAndHold
-
clickAndHold
-
doubleClick
-
doubleClick
-
dragAndDrop
ElementActionsContract dragAndDrop(org.openqa.selenium.By sourceElementLocator, org.openqa.selenium.By destinationElementLocator) -
dragAndDrop
default ElementActionsContract dragAndDrop(ShaftLocator sourceElementLocator, ShaftLocator destinationElementLocator) -
dragAndDropByOffset
ElementActionsContract dragAndDropByOffset(org.openqa.selenium.By sourceElementLocator, int xOffset, int yOffset) -
dragAndDropByOffset
default ElementActionsContract dragAndDropByOffset(ShaftLocator sourceElementLocator, int xOffset, int yOffset) -
hover
-
hover
-
hoverAndClick
ElementActionsContract hoverAndClick(List<org.openqa.selenium.By> hoverElementLocators, org.openqa.selenium.By clickableElementLocator) -
select
-
select
-
setValueUsingJavaScript
-
setValueUsingJavaScript
-
submitFormUsingJavaScript
-
submitFormUsingJavaScript
-
switchToIframe
-
switchToIframe
-
switchToDefaultContent
ElementActionsContract switchToDefaultContent() -
switchToParentFrame
Switches focus from the current iframe to its parent frame.- Returns:
- a self-reference to be used to chain actions
-
getCurrentFrame
String getCurrentFrame() -
type
-
type
Types into an input resolved by visible label, placeholder, or accessible name.- Parameters:
elementName- the visible label, placeholder, or accessible name of the target inputtext- one or more character sequences to type- Returns:
- a self-reference to be used to chain actions
-
type
-
clear
-
clear
-
typeAppend
-
typeAppend
-
typeFileLocationForUpload
ElementActionsContract typeFileLocationForUpload(org.openqa.selenium.By elementLocator, String filePath) -
typeFileLocationForUpload
default ElementActionsContract typeFileLocationForUpload(ShaftLocator elementLocator, String filePath) -
typeSecure
-
typeSecure
-
getTableRowsData
-
getTableRowsData
-
captureScreenshot
-
captureScreenshot
-
ariaSnapshot
Captures an accessible-name-tree ("aria") snapshot of the target element, serialized as YAML.- Parameters:
elementLocator- the locator of the element to snapshot- Returns:
- the captured snapshot serialized as YAML
-
ariaSnapshot
-