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 makeCustom
act as aMultiPhaseAction
, thereforeMultiPhased.noNextPhase()
must be called explicitly before ending custom action.Custom(java.util.function.Consumer, java.util.List)
is used to makeCustom
act as aSinglePhaseAction
.
- Author:
- Kimberly
-
Constructor Summary
ConstructorsConstructorDescriptionCustom
(Consumer<ActionComposer> customAction) Create aCustom
acting like aSinglePhaseAction
.Custom
(Consumer<ActionComposer> customAction, List<org.openqa.selenium.By> frameBySequence) Create aCustom
acting like aSinglePhaseAction
.Custom
(Function<MultiPhased, Consumer<ActionComposer>> customAction) Create aCustom
acting like aMultiPhaseAction
.Custom
(Function<MultiPhased, Consumer<ActionComposer>> customAction, List<org.openqa.selenium.By> frameBySequence) Create aCustom
acting like aMultiPhaseAction
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Perform 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 aCustom
acting like aMultiPhaseAction
.- Parameters:
customAction
- multiple-phased custom action
-
Custom
public Custom(Function<MultiPhased, Consumer<ActionComposer>> customAction, List<org.openqa.selenium.By> frameBySequence) Create aCustom
acting 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 aCustom
acting like aSinglePhaseAction
.- Parameters:
customAction
- custom action
-
Custom
Create aCustom
acting 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:MultiPhaseAction
Perform multiple-phased browser action.MultiPhaseAction.noNextPhase()
needs to be invoked to signal that there is no more phase to execute.- Specified by:
performMultiPhase
in classMultiPhaseAction
-
toString
- Overrides:
toString
in classMultiPhaseAction
-