Package org.kquiet.browser.action
Class Custom
java.lang.Object
org.kquiet.browser.action.MultiPhaseAction
org.kquiet.browser.action.Custom
- All Implemented Interfaces:
Composable,MultiPhased
Custom is a subclass of MultiPhaseAction which performs custom action by phases
to avoid blocking the execution of other browser actions.
There are two constructors of Custom:
Custom(java.util.function.Function, java.util.List)is used to makeCustomact as aMultiPhaseAction, thereforeMultiPhased.noNextPhase()must be called explicitly before ending custom action.Custom(java.util.function.Consumer, java.util.List)is used to makeCustomact as aSinglePhaseAction.
- Author:
- Kimberly
-
Constructor Summary
ConstructorsConstructorDescriptionCustom(Consumer<ActionComposer> customAction) Create aCustomacting like aSinglePhaseAction.Custom(Consumer<ActionComposer> customAction, List<org.openqa.selenium.By> frameBySequence) Create aCustomacting like aSinglePhaseAction.Custom(Function<MultiPhased, Consumer<ActionComposer>> customAction) Create aCustomacting like aMultiPhaseAction.Custom(Function<MultiPhased, Consumer<ActionComposer>> customAction, List<org.openqa.selenium.By> frameBySequence) Create aCustomacting like aMultiPhaseAction. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPerform multiple-phased browser action.toString()Methods inherited from class org.kquiet.browser.action.MultiPhaseAction
getActionState, getComposer, getCostTime, getErrors, hasNextPhase, isDone, isFail, noNextPhase, perform, setActionState, setComposer, switchToTopForFirefox
-
Constructor Details
-
Custom
Create aCustomacting like aMultiPhaseAction.- Parameters:
customAction- multiple-phased custom action
-
Custom
public Custom(Function<MultiPhased, Consumer<ActionComposer>> customAction, List<org.openqa.selenium.By> frameBySequence) Create aCustomacting like aMultiPhaseAction.- Parameters:
customAction- multiple-phased custom actionframeBySequence- the sequence of the frame locating mechanism for the frame where the custom action to be performed against
-
Custom
Create aCustomacting like aSinglePhaseAction.- Parameters:
customAction- custom action
-
Custom
Create aCustomacting like aSinglePhaseAction.- Parameters:
customAction- custom actionframeBySequence- the sequence of the frame locating mechanism for the frame where the custom action to be performed against
-
-
Method Details
-
performMultiPhase
protected void performMultiPhase()Description copied from class:MultiPhaseActionPerform multiple-phased browser action.MultiPhaseAction.noNextPhase()needs to be invoked to signal that there is no more phase to execute.- Specified by:
performMultiPhasein classMultiPhaseAction
-
toString
- Overrides:
toStringin classMultiPhaseAction
-