Package org.kquiet.browser.action
Class Extract
java.lang.Object
org.kquiet.browser.action.MultiPhaseAction
org.kquiet.browser.action.Extract
- All Implemented Interfaces:
Composable
,MultiPhased
Extract
is a subclass of MultiPhaseAction
which extract information from element
by phases to avoid blocking the execution of other browser actions.- Author:
- Kimberly
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an action to extract information from element.Create an action to extract information from element.Extract
(org.openqa.selenium.By by, List<org.openqa.selenium.By> frameBySequence, String textVariableName) Create an action to extract information from element.Extract
(org.openqa.selenium.By by, List<org.openqa.selenium.By> frameBySequence, String textVariableName, Map<String, String> attrVariableNames) Create an action to extract information from element.Extract
(org.openqa.selenium.By by, List<org.openqa.selenium.By> frameBySequence, Map<String, String> attrVariableNames) Create an action to extract information from element.Create an action to extract information from element. -
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
-
Extract
Create an action to extract information from element.- Parameters:
by
- the element locating mechanismtextVariableName
- text variable name; non-empty name means to get the visible (i.e. not hidden by CSS) text of the element(including sub-elements) as a variable ofActionComposer
-
Extract
public Extract(org.openqa.selenium.By by, List<org.openqa.selenium.By> frameBySequence, String textVariableName) Create an action to extract information from element.- Parameters:
by
- the element locating mechanismframeBySequence
- the sequence of the frame locating mechanism for the element resides in frame(or frame in another frame and so on)textVariableName
- text variable name; non-empty name means to get the visible (i.e. not hidden by CSS) text of the element(including sub-elements) as a variable ofActionComposer
-
Extract
Create an action to extract information from element.- Parameters:
by
- the element locating mechanismattrVariableNames
- (attribute name, variable name) pairs to set as variables. For each pair,Extract
sets the property value of the element as a variable ofActionComposer
if the property exists. If property doesn't exists,Extract
sets the attribute value of the element as a variable ofActionComposer
. If neither exists, null-value variable is set.
-
Extract
public Extract(org.openqa.selenium.By by, List<org.openqa.selenium.By> frameBySequence, Map<String, String> attrVariableNames) Create an action to extract information from element.- Parameters:
by
- the element locating mechanismframeBySequence
- the sequence of the frame locating mechanism for the element resides in frame(or frame in another frame and so on)attrVariableNames
- (attribute name, variable name) pairs to set as variables. For each pair,Extract
sets the property value of the element as a variable ofActionComposer
if the property exists. If property doesn't exists,Extract
sets the attribute value of the element as a variable ofActionComposer
. If neither exists, null-value variable is set.
-
Extract
public Extract(org.openqa.selenium.By by, String textVariableName, Map<String, String> attrVariableNames) Create an action to extract information from element.- Parameters:
by
- the element locating mechanismtextVariableName
- text variable name; non-empty name means to get the visible (i.e. not hidden by CSS) text of the element(including sub-elements) as a variable ofActionComposer
attrVariableNames
- (attribute name, variable name) pairs to set as variables. For each pair,Extract
sets the property value of the element as a variable ofActionComposer
if the property exists. If property doesn't exists,Extract
sets the attribute value of the element as a variable ofActionComposer
. If neither exists, null-value variable is set.
-
Extract
public Extract(org.openqa.selenium.By by, List<org.openqa.selenium.By> frameBySequence, String textVariableName, Map<String, String> attrVariableNames) Create an action to extract information from element.- Parameters:
by
- the element locating mechanismframeBySequence
- the sequence of the frame locating mechanism for the element resides in frame(or frame in another frame and so on)textVariableName
- text variable name; non-empty name means to get the visible (i.e. not hidden by CSS) text of the element(including sub-elements) as a variable ofActionComposer
attrVariableNames
- (attribute name, variable name) pairs to set as variables. For each pair,Extract
sets the property value of the element as a variable ofActionComposer
if the property exists. If property doesn't exists,Extract
sets the attribute value of the element as a variable ofActionComposer
. If neither exists, null-value variable is set.
-
-
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
-