Typedef
Static Public Summary | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
RawBehaviorIterator: AsyncIterator<RawBehaviorStepResults>|AsyncIterableIterator<RawBehaviorStepResults> |
|
public |
|
|
public |
|
|
public |
|
|
public |
SomeElement: HTMLAnchorElement | HTMLElement | HTMLAppletElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLBaseFontElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDirectoryElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFontElement | HTMLFormElement | HTMLFrameElement | HTMLFrameSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMarqueeElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLObjectElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLParamElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableDataCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTableHeaderCellElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | Element | Node | SVGAElement | SVGCircleElement | SVGClipPathElement | SVGDefsElement | SVGDescElement | SVGEllipseElement | SVGFEBlendElement | SVGFEColorMatrixElement | SVGFEComponentTransferElement | SVGFECompositeElement | SVGFEConvolveMatrixElement | SVGFEDiffuseLightingElement | SVGFEDisplacementMapElement | SVGFEDistantLightElement | SVGFEFloodElement | SVGFEFuncAElement | SVGFEFuncBElement | SVGFEFuncGElement | SVGFEFuncRElement | SVGFEGaussianBlurElement | SVGFEImageElement | SVGFEMergeElement | SVGFEMergeNodeElement | SVGFEMorphologyElement | SVGFEOffsetElement | SVGFEPointLightElement | SVGFESpecularLightingElement | SVGFESpotLightElement | SVGFETileElement | SVGFETurbulenceElement | SVGFilterElement | SVGForeignObjectElement | SVGGElement | SVGImageElement | SVGLineElement | SVGLinearGradientElement | SVGMarkerElement | SVGMaskElement | SVGMetadataElement | SVGPathElement | SVGPatternElement | SVGPolygonElement | SVGPolylineElement | SVGRadialGradientElement | SVGRectElement | SVGScriptElement | SVGStopElement | SVGStyleElement | SVGSVGElement | SVGSwitchElement | SVGSymbolElement | SVGTextElement | SVGTextPathElement | SVGTitleElement | SVGTSpanElement | SVGUseElement | SVGViewElement |
|
public |
|
|
public |
|
|
public |
|
|
public |
WaitForSelectorOptions(cntx: SomeElement | Document, options: WaitForOptions): Object |
|
public |
|
|
public |
|
|
public |
|
Static Public
public BehaviorRunOptions: Object source
Properties:
Name | Type | Attribute | Description |
delayAmount | number |
|
Time value in milliseconds representing how much time should be waited after initiating a behavior's step |
noOutlinks | boolean |
|
Should the collection of outlinks be disabled when running the behavior |
logging | boolean |
|
Should information the behavior sends be displayed |
public BehaviorRunnerAsyncIterator: Object source
Properties:
Name | Type | Attribute | Description |
next | function(): Promise<BehaviorStepResults> | function used to initiate the next action of the behavior |
public BehaviorRunnerInitOpts: Object source
Properties:
Name | Type | Attribute | Description |
win | Window | ||
behaviorStepIterator | RawBehaviorIterator | An async iterator that yields the state of the behavior |
|
postStepFN | function(results: RawBehaviorStepResults): BehaviorStepResults |
|
An optional function that is supplied the state of the behavior after performing an action. It is required that this function returns the state unmodified or a transformation of the state that is either an object that contains the original value of the done property or a boolean that is the value of the original done property. |
metadata | Object |
|
Optional metadata about the behavior currently being run |
public BehaviorRunnerOpts: Object source
Properties:
Name | Type | Attribute | Description |
behaviorStepIterator | RawBehaviorIterator | An async iterator that yields the state of the behavior |
|
postStepFN | function(results: RawBehaviorStepResults): BehaviorStepResults |
|
An optional function that is supplied the state of the behavior after performing an action. It is required that this function returns the state unmodified or a transformation of the state that is either an object that contains the original value of the done property or a boolean that is the value of the original done property. |
metadata | Object |
|
Optional metadata about the behavior currently being run |
public BehaviorStepResults: Object source
Properties:
Name | Type | Attribute | Description |
done | boolean | Has the behavior finished performing its actions |
|
wait | boolean | Should a wait for network idle be performed if possible by the runner |
|
msg | string | A message from the behavior representing a description of the action just performed |
|
state | * | Any additional information about the full state of the behavior |
public CreateMouseEventOptions: Object source
Properties:
Name | Type | Attribute | Description |
type | string | The type of the mouse event to be created |
|
elem | Element | The element the mouse event will be fired on used to calculate mouse position |
|
position | Object |
|
An object specifying the events position |
eventOpts | Object |
|
Additional options to be used |
view | Window |
|
The view (window) |
clickCount | number |
|
How many clicks have been done before this event |
public DisconnectingWalkState: Object source
Properties:
Name | Type | Attribute | Description |
walkEndedReason | number | The WalkEndedReasons why the walk ended (set once the walk has ended) |
|
findParentElement | function(): SomeElement | function used to find the parent element |
|
refindCurrentChild | function(parent: SomeElement, child: SomeElement): SomeElement | function used to re-find the currnet child when the parent element has become disconnected |
|
shouldWait | function(parent: SomeElement, child: SomeElement): boolean | function used to determine if the wait function should be called |
|
wait | function(parent: SomeElement, child: SomeElement): boolean | function used to wait once |
|
nextChild | function(parent: SomeElement, child: SomeElement): SomeElement | function used to get the next child element |
public ElemOrPromiseElem: SomeElement | Promise<SomeElement> source
public FireMouseEventsOnOptions: Object source
Properties:
Name | Type | Attribute | Description |
elem | Element | The element the mouse event will be fired on used to calculate mouse position |
|
eventNames | Array<string> | The event types to be fired |
|
view | Window |
|
The view (window) |
position | Object |
|
An object specifying the events position |
eventOpts | Object |
|
Additional options to be used |
clickCount | number |
|
How many clicks have been done before this event |
public GuardedWaitForOptions: Object source
Properties:
Name | Type | Attribute | Description |
guard | function(): boolean |
|
Function polled to determine if the wait is considered done by additional conditions |
pollRate | number |
|
The rate at which the condition will be checked |
max | number |
|
The maximum length of time the polling will happen in milliseconds |
public RawBehaviorIterator: AsyncIterator<RawBehaviorStepResults>|AsyncIterableIterator<RawBehaviorStepResults> source
public RawBehaviorStepResults: Object source
Properties:
Name | Type | Attribute | Description |
done | boolean | Is the generator finished |
|
value | BehaviorState |
|
The value yielded by the behavior |
public Scroller: Object source
Properties:
Name | Type | Attribute | Description |
timesToScroll | number | the desired number of times to be scrolled |
|
scrollUpDownAmount | number | The current amount to be scrolled up or down |
|
scrollLeftRightAmount | number | The current amount to be scrolled left or right |
|
scrollRight | function(): void | Scroll the page right |
|
scrollLeft | function(): void | Scroll the page left |
|
scrollUp | function(): void | Scroll the page up |
|
scrollDown | function(): void | Scroll the page down |
|
canScrollDownMore | function(): boolean | Can the page be scrolled some more down |
|
canScrollUpMore | function(): boolean | Can the page be scrolled some more up |
public SelectScrollIntoViewClickUntilNullOptions: Object source
Properties:
Name | Type | Attribute | Description |
cntx | Document | Element | HTMLElement |
|
optional element to call querySelector on using selector |
stopPredicate | function(selected: Element): boolean |
|
optional function called to determine if the loop should end after each iteration @property{number} [delay] - amount of time, in milliseconds, that should be waited after scrolling into view and clicking (defaults to 1 second) -- Only used if the function will apply a delay |
public SomeElement: HTMLAnchorElement | HTMLElement | HTMLAppletElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLBaseFontElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDirectoryElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFontElement | HTMLFormElement | HTMLFrameElement | HTMLFrameSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMarqueeElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLObjectElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLParamElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableDataCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTableHeaderCellElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | Element | Node | SVGAElement | SVGCircleElement | SVGClipPathElement | SVGDefsElement | SVGDescElement | SVGEllipseElement | SVGFEBlendElement | SVGFEColorMatrixElement | SVGFEComponentTransferElement | SVGFECompositeElement | SVGFEConvolveMatrixElement | SVGFEDiffuseLightingElement | SVGFEDisplacementMapElement | SVGFEDistantLightElement | SVGFEFloodElement | SVGFEFuncAElement | SVGFEFuncBElement | SVGFEFuncGElement | SVGFEFuncRElement | SVGFEGaussianBlurElement | SVGFEImageElement | SVGFEMergeElement | SVGFEMergeNodeElement | SVGFEMorphologyElement | SVGFEOffsetElement | SVGFEPointLightElement | SVGFESpecularLightingElement | SVGFESpotLightElement | SVGFETileElement | SVGFETurbulenceElement | SVGFilterElement | SVGForeignObjectElement | SVGGElement | SVGImageElement | SVGLineElement | SVGLinearGradientElement | SVGMarkerElement | SVGMaskElement | SVGMetadataElement | SVGPathElement | SVGPatternElement | SVGPolygonElement | SVGPolylineElement | SVGRadialGradientElement | SVGRectElement | SVGScriptElement | SVGStopElement | SVGStyleElement | SVGSVGElement | SVGSwitchElement | SVGSymbolElement | SVGTextElement | SVGTextPathElement | SVGTitleElement | SVGTSpanElement | SVGUseElement | SVGViewElement source
public TraversalOpts: Object source
Properties:
Name | Type | Attribute | Description |
handler | function(element: SomeElement, additionalArgs: *): * | The function to be called for each child |
|
parentElement | SomeElement |
|
The element who's children are to be visited, if not supplied it is expected that a setup function is |
setup | function(): ElemOrPromiseElem |
|
Function used to receive the parent element who's children are to be traversed. |
setupFailure | function(): * |
|
Function called if the supplied setup function fails to return a parent element or the supplied parent element is falsy |
nextChild | function(parent: SomeElement, child: SomeElement): ElemOrPromiseElem |
|
Function used to get the next child to be visited |
filter | function(child: SomeElement): BoolOrPromiseBool |
|
Function used to determine if a specific child is to be handled or not, returning true indicates the child element is to be handled false otherwise |
selector | function(child: SomeElement): Element |
|
Function used to select a more specific element to be used |
shouldWait | function(parent: SomeElement, child: SomeElement): BoolOrPromiseBool |
|
Function used to determine if a wait for additional children should be done |
wait | function(parent: SomeElement, child: SomeElement): Promise<*> |
|
Function used to perform the wait for additional children |
preTraversal | function(): * |
|
Function used to perform some action before traversal begins. If this function returns an (async) generator the values of the generator are yielded otherwise no value this function returns is yielded |
postTraversal | function(setupFailure: boolean): * |
|
Function called after the traversal is complete with T/F indicating if the function is being called if setup failed or the traversal is complete. The value of this function yield'd if it is truthy |
additionalArgs | * |
|
Optional additional arguments to be supplied to the handler function |
loader | boolean |
|
Should the traversal expect that the parent element could have additional child elements added e.g. infinite loading. If loader is falsy and either or both shouldWait and wait function(s) are supplied then the walk behaves as if the loader was set to true |
waitOptions | WaitForOptions |
|
Options controlling the wait for more children |
public WaitForSelectorOptions(cntx: SomeElement | Document, options: WaitForOptions): Object source
Properties:
Name | Type | Attribute | Description |
selector | string | The selector to be waited for |
public WalkChildrenOfCustomOpts: Object source
Properties:
Name | Type | Attribute | Description |
parentElement | SomeElement | The element who's children are to be visited, if not supplied it is expected that a setup function is |
|
nextChild | function(parent: SomeElement, child: SomeElement): ElemOrPromiseElem |
|
Function used to get the next child to be visited |
selector | function(child: SomeElement): Element |
|
Function used to select a more specific element to be used |
filter | function(child: SomeElement): BoolOrPromiseBool |
|
Function used to determine if a specific child is to be handled |
shouldWait | function(parent: SomeElement, child: SomeElement): BoolOrPromiseBool |
|
Function used to determine if a wait for additional children should be done |
wait | function(parent: SomeElement, child: SomeElement): Promise<*> |
|
Function used to perform the wait for additional children |
loader | boolean |
|
Should the walk expect that the parent element could have additional child elements added e.g. infinite loading. If loader is falsy and either or both shouldWait and wait function(s) are supplied then the walk behaves as if the loader was set to true |
waitOptions | WaitForOptions |
|
Options controlling the wait for more children waitForAdditionalElemChildren when no custom wait function is supplied |