Home Reference Source

References

summary
public

A thin wrapper around the execution of a behaviors actions in order to support behavior pausing.

public

Observe dom mutation using a MutationObserver as a stream (AsyncIterator)

public

Performs the setup required for integration with Webrecorders automation system Adds as propeties to the supplied window object

  • $WBBehaviorStepIter$: the supplied behaviorStepIterator
  • $WBBehaviorRunner$: the instance of the class that wraps the behaviors actions
  • $WRIteratorHandler$: a function that initiates a behaviors action
public

F createState(wait: boolean, msg: *, state: *): BehaviorState

Returns a behavior state object with the supplied wait and msg values.

public

Returns a behavior state object with the supplied msg indicating the behavior runner should not wait for network idle.

public

Returns a behavior state object with the supplied msg indicating the behavior runner should wait for network idle.

public

F async stateWithMsgWaitFromAwaitable(awaitable: Promise<boolean>, msg: *, state: *): Promise<BehaviorState>

Returns a Promise that resolves to an behavior state object with the supplied msg with the wait value being set by the value resolved Promise.

public

F stateWithMsgWaitFromFn(fn: function(): boolean, msg: *, state: *): BehaviorState

Returns a behavior state object with the supplied msg with the wait value being set by the return value of the supplied function.

public

Navigate the browser back 1 entry in the history stack.

public

Returns the value window.location.href

public

Determines if window.location.href contains the supplied value as a substring.

public

F locationEquals(someLocation: string): boolean

Determines the strict equality of the string to the value of window.location.href

public

Waits for the value of window.location.href to differ from the supplied value due to browser history manipulation.

public

Calls the click function on the supplied element if non-null/defined.

public

F async clickAndWaitFor(elem: Element | Node | HTMLElement, predicate: function(): boolean, options: WaitForOptions): Promise<{predicate: boolean, maxExceeded: boolean, clicked: boolean}>

Clicks the supplied element and then waits for the supplied predicate function to return true

public

F async clickAndWaitForHistoryChange(elemToBeClicked: Element | HTMLElement, waitOpts: WaitForOptions): Promise<{oldlocation: ?string, historyChanged: boolean, clicked: boolean, newLocation: ?string, ok: boolean}>

Clicks the supplied element and waits for browser history to change (the URL is updated by JavaScript modifying the current history stack)

public

F clickInContext(elem: SomeElement, cntx: Window): boolean

Calls the click function on the supplied element if non-null/defined that exists in the JS context of the supplied window (cntx).

public

F async clickInContextWithDelay(elem: HTMLElement | Element, cntx: Window, delayTime: number): Promise<boolean>

Calls the click method of the supplied element that exists in the JS context of the supplied window object (cntx) and waits the specified delayTime after clicking IFF the supplied element was non-null/undefined.

public

F async clickWithDelay(elem: SomeElement, delayTime: number): Promise<boolean>

Calls the click method of the supplied element and waits the specified delayTime after clicking IFF the supplied element was non-null/undefined.

public

F scrollAllIntoViewAndClick(elems: Array<HTMLElement>): number

Scrolls into view and clicks all the elements present in the supplied array.

public

F async scrollAllIntoViewAndClickWithDelay(elems: Array<HTMLElement|Element|Node>, delayTime: number): Promise<void>

Scrolls into view and clicks all the elements present in the supplied array waiting for the supplied delay time after each click of an element in the array.

public

F scrollIntoViewAndClick(elem: HTMLElement | Element): boolean

Scrolls the supplied element into view and clicks it if the element is non-null/undefined

public

F scrollIntoViewAndClickWithDelay(elem: HTMLElement | Element, delayTime: number): Promise<boolean>

Scrolls the supplied element into view and clicks it if the element is non-null/undefined and waits for the specified delay time

public

F selectAllAndClick(selector: string, context: Element): boolean

Selects all elements that match the supplied selector and clicks them returning T/F indicating if a click happened on any selected element

public

F async selectAllAndClickWithDelay(opts: {selector: string, cntx: *, delayTime: *}): boolean

Selects all elements that match the supplied selector and clicks them returning T/F indicating if a click happened on any selected element

public

F selectClickAndWaitFor(selector: string, predicate: function(): boolean, selectFrom: HTMLElement | Document): Promise<{predicate: boolean, maxExceeded: boolean, clicked: boolean}>

Clicks the element returned by calling querySelector using the selector on document or the supplied element (selectFrom) and then waits for the supplied predicate function to return true

public

F selectElemAndClick(selector: string, cntx: *): boolean

Clicks the element from executing document.querySelector using the supplied selector

public

Clicks the element from executing document.querySelector using the supplied selector and waiting the specified delay time after clicking

public

F selectElemFromAndClick(selectFrom: Element | Node | HTMLElement, selector: string): boolean

Clicks the element from executing querySelector using the supplied selector using the supplied element

public

F selectElemFromAndClickWithDelay(selectFrom: Element | Node | HTMLElement, selector: string, delayTime: number): Promise<boolean>

Clicks the element from executing querySelector using the supplied selector from the supplied element and waiting the specified delay time after clicking

public

F selectFromAndClickNTimes(selectFrom: Element, selector: string, n: number): number

Clicks the element returned from result of calling querySelector using the supplied selector on the supplied element N number of times.

public

F async selectFromAndClickNTimesWithDelay(selectFrom: Element, selector: string, n: number, delayTime: number): Promise<number>

Clicks the element returned from result of calling querySelector using the supplied selector on the supplied element N number of times and waits for delay time afters each click.

public

F async selectFromAndClickUntilNullWithDelay(selectFrom: Element, selector: string, options: {delay: number, max: ?number}): Promise<number>

Clicks the element returned from result of calling querySelector using the supplied selector on the supplied element until the results of the evaluting the selector returns null/undefined, waiting for delay time afters each click.

public

Like selectFromAndClickUntilNullWithDelay but will stop selecting and clicking the selected element if the current reference becomes disconnected from the dom or the optional stopPredicate returns true.

public

Like selectFromAndClickUntilNullWithDelay but will stop selecting and clicking the selected element if the current reference becomes disconnected from the dom or the optional stopPredicate returns true.

public

F delay(delayTime: number): Promise<void>

Returns a Promise that resolves after waiting the amount of time specified by delayTime.

public

Returns a promise that resolves once document.readyState === 'complete'

public

Returns a Promise that resolves once the behavior has been un-paused

public

Converts the supplied n number of seconds into milliseconds which is required for setTimeout and setInterval

public

F setIntervalP(callback: *, timeout: *): number

Polls the supplied function at the timeout rate only if the behavior is not paused

public

F setTimeoutP(callback: *, timeout: *): number

Like setTimeout except that the timeout respects the pause state of the behavior

public

Waits for the number children of the supplied parentElement to become greater than the supplied parent elements currentChildCount.

public

Waits for additional child elements to be added to the supplied parentElement using a mutation observer.

public

F async waitForAndSelectElement(fromNode: SomeElement, selector: string, options: WaitForOptions): PromiseSomeElement>

Calls fromNode.querySelector using the supplied selector.

public

Returns a promise that resolves once the supplied predicate function returns a truthy value.

public

Waits for the supplied selector to exist

public

Waits for the supplied element to be removed from the document.

public

Creates a style tag if one was not created before and adds the supplied styleDef to it.

public

F addClass(elem: SomeElement, clazz: string)

Adds a CSS classname to the supplied element

public

F anySelectorExists(selectors: Array<string>, cntx: SomeElement): {idx: number, success: boolean}

Determines if the element the supplied selector selects exists.

public

F attr(elem: SomeElement, attr: string): *

Retrieves the value of an elements attribute if it exists

public

F attrEq(elem: SomeElement, attr: string, shouldEq: *): boolean

Tests to determine if the value of elements attribute equals the supplied value using loose equality

public

F canAccessIf(iframe: HTMLIFrameElement): boolean

Determines if the supplied iframe is accessible from this origin.

public

Chains firstChildElementOf on the supplied element n times

public

Chains lastChildElementOf n times starting with the supplied element

public

Chains nthChildElementOf for each nth child element in nths

public

F chainNthChildNodeOf(startingElem: SomeElement, nths: ...number): SomeElement

Chains nthChildElemOf for each nth child in nths

public

F chainQs(startingSelectFrom: SomeElement | Document, startingSelector: string, selectors: ...string): SomeElement

Consecutively calls querySelector(selector) on the element returned by the previous invocation

public

F * childElementIterator(parentElement: SomeElement): IterableIterator<SomeElement>

Returns an iterator over the supplied parent element's child elements that ends once the current child has no next element sibling.

If the parent element is null/undefined then the returned iterator yields nothing.

public

F * childNodeIterator(parentElement: SomeElement): IterableIterator<Node>

Returns an iterator over the supplied parent element's child nodes that ends once the current child has no next sibling.

If the parent element is null/undefined then the returned iterator yields nothing.

public

F docBaseURIEndsWith(shouldEndWith: string, cntxDoc: Document): boolean

Returns T/F indicating if the documents baseURI ends with the supplied string

public

F docBaseURIEquals(shouldEqual: string, cntxDoc: Document): boolean

Returns T/F indicating if the documents baseURI equals the supplied string

public

F documentScrollPosition(doc: Document): {scrollTop: number, scrollLeft: number}

Returns the scrollTop and scrollLeft values of the supplied document if one was supplied other wise the values are from the current document

public

F elemDataValue(elem: HTMLElement | SVGElement, dataKey: string): string

Returns the value of the elements data attribute if it exists If the element is null/undefined or does not have data attributes null is returned.

public

F elemDataValueEqs(elem: HTMLElement | SVGElement, dataKey: *, dataValue: *): boolean

Returns T/F indicating if the element has data attribute equal to the supplied value

public

Returns T/F indicating if the supplied element has children.

public

Returns T/F indicating if the supplied element has an sibling element

public

Determines if the supplied elements bounding client rect's x,y,width,height,top,left properties all equal zero. Note this function returns true if the element is null/undefined;

public

Returns the supplied elements innerText

public

F elemInnerTextEqs(elem: SomeElement, shouldEqual: string, trim: boolean): boolean

Returns T/F if the supplied elements innerText equals the supplied string case sensitive

public

Returns T/F if the supplied elements innerText equals the supplied string case in-sensitive

public

F elemInnerTextEqsOneOf(elem: SomeElement, shouldEquals: ...string): boolean

Returns T/F if the supplied elements innerText equals one of the supplied string case sensitive

public

Returns T/F if the supplied elements innerText matches the supplied regex

public

Returns T/F indicating if the element matches the supplied selector

public

Returns true if the supplied elements offsetTop === 0

public

Returns the textContent of the supplied element

public

F elementTextContains(elem: SomeElement, needle: string, caseInsensitive: boolean): boolean

Returns T/F indicating if the supplied element's textContents contains the supplied string

public

Returns T/F indicating if the supplied element's textContent ends with the supplied string

public

F elementTextEqs(elem: SomeElement, shouldEqual: string, caseInsensitive: boolean): boolean

Returns T/F indicating if the supplied element's textContents equals the supplied string

public

Returns T/F indicating if the supplied element's textContent starts with the supplied string

public

Returns T/F indicating if the supplied element' textContent starts and ends with the supplied start and end strings

public

Returns T/F indicating if the elements name (localName) is equal to the supplied name

public

F filteredQs(selector: string, filterFn: function(elem: SomeElement): boolean, context: SomeElement | Document): SomeElement

Utility function for (document||element).querySelector(selector)

public

Applies the supplied predicate to every child element of the supplied parent element and returns the element that the predicate returns true for otherwise returns null.

public

F findTag(xpg: function(query: string, node: ?Node): Node[], tag: string, predicate: function(elem: SomeElement): boolean, cntx: Document | SomeElement): SomeElement

Attempts to find a tag using the supplied function that accepts an xpath query and an optional starting element and returns the element the supplied predicate function returns a truthy value for

public

Returns the first child element of the supplied elements parent element.

public

Returns the supplied elements first element child.

public

F firstChildElementOfSelector(selector: string, cntx: Document | SomeElement): SomeElement

Returns the first child element of the element matching the supplied selector

public

Returns the supplied elements next element sibling

public

Returns the supplied elements next element sibling and removes the supplied element

public

F getElementClientPageCenter(element: SomeElement, options: {floor: boolean}): {clientY: number, clientX: number, pageY: number, pageX: number}

Get the center of the passed DOM element

public

F getElementClientPagePosition(element: SomeElement, options: Object): {clientY: number, clientX: number, pageY: number, pageX: number}

Get the position of the passed DOM element

public

F getElementPositionWidthHeight(element: Element, doc: Document): {y: number, pageY: number, x: number, pageX: number, w: number, h: number}

Helper function to get the actual x and y position, page x and y position (scroll) and the height, width of a given element

public

Returns the next element sibling of the parent element of the supplied element

public

Returns the Nth parent element of the supplied element (indexing assumes start is 1)

public

F hasAnyClass(elem: SomeElement, classes: ...string): boolean

Tests to see if the supplied element has any of the supplied css classes

public

F hasClass(elem: SomeElement, clazz: string): boolean

Tests to see if the supplied element has a css class

public

F hasClasses(elem: SomeElement, classes: ...string): boolean

Tests to see if the supplied element has the supplied css classes

public

F id(eid: string, context: SomeElement | Document): SomeElement

Utility function for document.getElementById(id)

public

F idExists(eid: string, cntx: Document): boolean

Determines if the element the supplied id identifies exists

public

F innerTextOfSelected(selector: string, cntx: SomeElement | Document): string

Returns the inner text of the element the supplied selectors matches

public

Returns T/F indicating if the supplied element has not CSS classes

public

Returns T/F indicating if the supplied element is visible.

public

Returns the last child element of the supplied element

public

F lastChildElementOfSelector(selector: string, cntx: Document | SomeElement): SomeElement

Returns the last child element of the element the selector selects

public

Marks the supplied element as visited by adding the marker to its classList.

public

F maybePolyfillXPG(cliXPG: function(...args: *): Array<SomeElement>): function(...args: *): Array<SomeElement>

Ensures that if the value of the chrome console utility $x is not the actual utility (jquery is on the page) the returned function behaves exactly like it.

public

F maybeRemoveElem(selector: string, context: SomeElement | Document): boolean

Removes the element selected by the supplied querySelector, if it exits, returning true to indicate the element was removed and false otherwise

public

F maybeRemoveElemById(eid: string, context: SomeElement | Document): boolean

Removes the element with the supplied id, if it exits, returning true to indicate the element was removed and false otherwise

public

Returns T/F indicating if the nodes name (nodeName) is equal to the supplied name

public

F nthChildElementOf(elem: SomeElement | Document, nth: number): SomeElement

Returns the Nth child element of the supplied element (indexing assumes start is 1)

public

F nthChildNodeOf(elem: SomeElement | Document, nth: number): SomeElement

Returns the Nth child node of the supplied element (indexing assumes start is 1)

public

Returns the nth previous sibling of the supplied element if it is not null/undefined or the supplied element is not null/undefined

public

Returns the number of child elements the supplied element has if it is not null/undefined otherwise -1

public

F qs(selector: string, context: SomeElement | Document): SomeElement

Utility function for (document||element).querySelector(selector)

public

F qsOneOf(options: {selectors: Array<string>, context: *}): SomeElement

Returns the results of querySelector using one of the supplied selectors one if one of the selectors yields results otherwise null/undefined

public

F qsa(selector: string, context: SomeElement | Document): NodeList<SomeElement>

Utility function for document.querySelectorAll(selector)

public

F qsaOneOf(options: {selectors: Array<string>, context: *}): NodeList<SomeElement>

Returns the results of querySelectorAll using one of the supplied selectors if one of the selectors yields results otherwise null/undefined

public

F removeClass(elem: SomeElement, clazz: string)

Removes a CSS classname to the supplied element

public

F * repeatedXpathQueryIterator(query: string, cntx: *, generateMoreElements: function(): void): IterableIterator<SomeElement>

Repeatably performs the supplied xpath query yielding the results of the each query.

public

F async * repeatedXpathQueryIteratorAsync(query: string, cntx: *, generateMoreElements: function(): *): AsyncIterableIterator<SomeElement>

Repeatably performs the supplied xpath query yielding the results of the each query.

public

F selectedNextElementSibling(selector: string, context: SomeElement | Document): SomeElement

Returns the next element sibling of the supplied selector IFF the selector returns a results and the next element sibling exists otherwise null/undefined

public

F selectorExists(selector: string, cntx: Document | SomeElement): boolean

Determines if the element the supplied selector selects exists

public

Returns the results of splitting the supplied elements innerText using the supplied splitter

public

Returns the results of splitting the supplied elements textContent using the supplied splitter

public

Returns the results of evaluating one of the supplied xpath queries if one of the queries yields results otherwise null/undefined

public

F xpathSnapShot(xpathQuery: string, contextElement: SomeElement | Document): XPathResult

Returns the results of evaluating the supplied xpath query using an optional context contextElement, defaults to document, as XPathResult.ORDERED_NODE_SNAPSHOT_TYPE

public

F xpathSnapShotArray(xpathQuery: string, contextElement: SomeElement | Document): Array<SomeElement>

Provides the same functionality of the chrome console utility $x but likely less performant

public

F createMouseEvent(config: CreateMouseEventOptions): MouseEvent

Creates and returns a new mouse event configured using the supplied options

public

F fireEventOn(elem: Element, event: Event)

Fires the supplied event on the supplied element

public

Creates mouse events and fires them in order configured using the supplied options

public

F waitForEventTargetToFireEvent(eventTarget: EventTarget, event: string, max: number): Promise<boolean>

Returns a promise that resolves to true once the supplied event is fired from the supplied event target.

public

Initiates an pywb/webrecorder auto-fetch of content

public

F autobind(clazz: *)

Automatically binds the non-inherited functions of the supplied class to itself.

public

F compose(funcs: function(...args: *): *): function(...args: *): *

Composes multiple functions from right to left into a single function.

public

F composeAsync(funcs: function(...args: *): Promise<*>): function(...args: *): Promise<*>

Composes multiple async or Promise returning functions from right to left into a single function.

public

F composeAsyncIterators(funcs: function(...args: *): AsyncIterator<*>): function(...args: *): AsyncIterator<*>

Composes multiple AsyncIterator returning functions from right to left into a single function.

public

F composeIterators(funcs: function(...args: *): Iterator<*>): function(...args: *): Iterator<*>

Composes multiple Iterator returning functions from right to left into a single function.

public

F extractProps(object: Object, props: ...string): Object

Returns a new object with the properties of the object on the new object

public

F getViaPath(obj: *, pathItems: *): *

Retrieves the property of an object, or item in array at index, based on the supplied path.

public

F globalWithPropsExist(global: string, props: ...string): boolean

Returns T/F if an global property (on window) exists and has all properties.

public

F isFunction(obj: *): boolean

Returns T/F indicating if the supplied arument is a function

public

F isGenerator(obj: *): boolean

Returns T/F indicating if the supplied object is a generator or async generator

public

F isPromise(obj: *): boolean

Returns T/F indicating if the supplied object is a Promise or Promise like

public

F async * mapAsyncIterator(iterator: AsyncIterableIterator<*>, mapper: function(arg: *): *): AsyncIterableIterator<*>

Like map for arrays but over async-iterators

public

F async * noExceptGeneratorWrap(generator: AsyncIterableIterator<*>|IterableIterator<*>, returnLast: boolean): AsyncIterableIterator<*>

Wraps the supplied generator in a try catch and re-yields its values generator.

public

F noop()

This function is a no op

public

F objectHasProps(obj: Object, props: ...string): boolean

Returns T/F if the supplied object has all of the supplied properties.

public

F objectInstanceOf(obj: Object, shouldBeInstanceOfThis: Object): boolean

Returns T/F indicating if the supplied object is an instance of some class.

public

F partial(fn: function, a1: *, a2: *, a3: *, a4: *, a5: *, aN: ...*): function(...args: *): *

Creates and returns a partially applied function with args being applied left to right

public

F partialRight(fn: function, a1: *, a2: *, a3: *, a4: *, a5: *, aN: ...*): function(...args: *): *

Creates and returns a partially applied function with args being applied right to left

public

F promiseResolveReject(): {resolve: function, reject: function, promise: Promise<*>}

Creates a Promise that is resolvable externally returning an object that exposes the promise itself and the resolve and reject functions passed as arguments to the executor function

public

Sends the supplied array of URLs to the backing pywb/webrecorder auto-fetch worker if it exists

public

F uuidv4(): string

Creates and returns a valid uuid v4

public

F async findAllMediaElementsAndPlay(cntx: Document | Element): Promise<boolean>

Calls the play function on all audio and video elements found in the document.

public

F async noExceptPlayMediaElement(mediaElement: HTMLMediaElement, playThrough: boolean): Promise<boolean>

Calls the play function of the supplied element catching the exception thrown if any was thrown.

public

F selectAndPlay(selector: string, cntx: Document | Element): Promise<boolean>

Calls the play method of the element returned by the querySelector

public

F selectIdAndPlay(eid: string, cntx: Document): Promise<boolean>

Calls the play method of the element returned by calling document.getElementById

public

F uaThinksMediaElementCanPlayAllTheWay(mediaElement: HTMLMediaElement): Promise<void>

Returns a promise that resolves once the canplaythrough or error event is fired from the supplied media element

public

F addOutLinks(toAdd: Array<HTMLAnchorElement|HTMLAreaElement>|NodeList<HTMLAnchorElement|HTMLAreaElement>)

Add the array/nodelist of A or Anchor tags href properties the collected outlinks

public

F addOutlink(elemOrString: HTMLAnchorElement | HTMLAreaElement | string)

Add the URL or href value of the supplied argument

public

F collectOutlinksFrom(queryFrom: Element | Document)

Collects outlinks form the supplied element

public

Collects the outlinks from the document

public

Creates and returns a function wrapping the provided post step function will call the supplied function and return the expected output.

public

The default post step function used for all behaviors that do not provide one.

public

F findChildWithKey(reactInstance: Object, key: string): Object

Walks the children of a react component to find the one that has the supplied key

public

F findReduxStore(startingComponent: Object): Object

Attempts the find the redux store from the supplied component

public

F getInternalRootOnElem(elem: HTMLElement | Element | Node): Object

Returns the internal root object added by react on the supplied element.

public

F getReactRootContainer(elem: HTMLElement | Element | Node): Object

Returns the root container object added by react

public

F getReactRootHostElem(alternativeId: string): HTMLElement

Returns the root host element of an react application (id = react-root)

public

F reactInstanceFromDOMElem(elem: HTMLElement | Element | Node): Object

Returns the react instance object that lives on the live element

public

F reactInstancesFromElements(elems: Array<Node|HTMLElement|Element>, selectingFn: function(key: string): boolean): Array<{node: HTMLElement|Element|Node, reactInstance: Object}>

Converts the supplied array of elements into an array of objects each with property node (the live dom element) and reactInstance (the live react component).

public

Determines if we can scroll down any more

public

Determines if we can scroll up any more

public

F createScrollAmount(desiredTimesToScroll: number): {timesToScroll: number, scrollUpDownAmount: number, scrollLeftRightAmount: number}

Creates and returns an object that calculates the scroll amount, up/down or left/right, based on dividing the scroll width/height by the supplied desired times to completely scroll the page, defaults to 10.

public

F createScroller(timesToScroll: number): Scroller

Creates and returns an object for scrolling the page up/down and left/right.

public

F scrollDownByElemHeight(elem: Element | HTMLElement | Node): void

Scrolls down by the elements height

public

F scrollDownByElemHeightWithDelay(elem: Element | HTMLElement | Node, delayTime: number): Promise<void>

Scrolls down by supplied elements height and then waits for the supplied delay time.

public

F scrollIntoView(elem: Element, opts: Object): void

Scrolls the supplied element into view.

public

F scrollIntoViewAndWaitFor(elem: Element | HTMLElement | Node, predicate: function(): boolean, options: {wait: ?WaitForOptions, scrollBehavior: ?Object}): Promise<{predicate: boolean, maxExceeded: boolean}>

Scrolls the supplied element into view and then waits for the supplied predicate function to return true

public

F scrollIntoViewWithDelay(elem: Element | HTMLElement | Node, delayTime: number): Promise<void>

Scrolls the supplied element into view, afterwards waits for the specified delay time

public

F scrollToElemOffset(elem: Element | HTMLElement | Node, behavior: string): void

Scrolls the window by the supplied elements offsetTop.

public

F scrollToElemOffsetWithDelay(elem: Element | HTMLElement | Node, delayTime: number): Promise<void>

Scrolls the window by the supplied elements offsetTop.

public

Scrolls the window by the supplied x and y amount

public

F scrollWindowByWithDelay(x: number, y: number, delayTime: number): Promise<void>

Scrolls the window by the supplied x and y amount

public

Scrolls the window down by the supplied amount

public

F scrollWindowDownByWithDelay(amount: number, delayTime: number): Promise<void>

Scrolls the window down by the supplied amount

public

Scrolls the window by the supplied x and y amount smoothly

public

Scrolls the window down by the supplied amount smoothly

public

Attempts to convert the supplied string into camel case

public

Attempts to convert the supplied camel case string into dash delimited string

public

Attempts to convert the supplied camel case string into an underscore delimited string

public

Attempts to capitalize the supplied string

public

Attempts to collapse all extra white space into a single white space character

public

Returns T/F indicating if the supplied string is only alpha characters

public

Returns T/F indicating if the supplied string is only alpha numeric characters

public

Returns T/F indicating if the supplied string is truly an empty string

public

Returns T/F indicating if the supplied string is only lowercase alpha characters

public

Returns T/F indicating if the supplied string only contains numeric characters

public

Returns T/F indicating if the supplied string is only uppercase alpha characters

public

F stringBetween(str: string, left: string, right: string): string

Returns the string between the left and right string

public

Returns the substring from the index of the supplied needle

public

Returns the substring from the last index of the supplied needle

public

Attempts to convert the supplied string into title case

public

Attempts to convert the supplied string to boolean (true, yes, on, 1)

public

F toFloat(str: string, precision: number): number

Attempts to convert the supplied string to a float

public

F toInt(str: string, base: number): number

Attempts to convert the supplied string to a integer

public

F async * disconnectingWalk(walkState: DisconnectingWalkState): AsyncIterableIterator<*>

Yields the child elements of the found parent element.

public

F async * traverseChildrenOf(parentElement: SomeElement, fn: function(element: SomeElement, additionalArgs: *): *, additionalArgs: *): AsyncIterableIterator<*>

Applies a function to the children of the supplied parent element yielding the return value of the function.

public

F async * traverseChildrenOfCustom(opts: TraversalOpts): AsyncIterableIterator<*>

Traverses the children of the supplied element applying the supplied function to each child and yielding the return value of the function.

public

F async * traverseChildrenOfLoaderParent(parentElement: SomeElement, fn: function(element: SomeElement, additionalArgs: *): *, additionalArgs: *): AsyncIterableIterator<*>

Applies a function to the children of the supplied parent element yielding the return value of the function.

public

F async * traverseChildrenOfLoaderParentGenFn(parentElement: SomeElement, genFn: function(): BoolOrPromiseBool, fn: function(element: SomeElement, additionalArgs: *): *, additionalArgs: *): AsyncIterableIterator<*>

Applies a function to the children of the supplied parent element yielding the return value of the function.

public

F async * traverseChildrenOfLoaderParentRemovingPrevious(parentElement: SomeElement, fn: function(element: SomeElement, additionalArgs: *): *, additionalArgs: *): AsyncIterableIterator<*>

Applies a function to the children of the supplied parent element yielding the return value of the function and then removing the previously considered child element from the DOM.

public

F async * traverseChildrenOfRemovingPrevious(parentElement: SomeElement, fn: function(element: SomeElement, additionalArgs: *): *, additionalArgs: *): AsyncIterableIterator<*>

Applies a function to the children of the supplied parent element yielding the return value of the function and then removing the previously considered child element from the DOM.

public

F async * walkChildrenOfCustom(opts: WalkChildrenOfCustomOpts): AsyncIterableIterator<SomeElement>

Walks the children of the supplied parent element yielding its children.

public

1 second in milliseconds

public

2the second in milliseconds

public

3 second in milliseconds

public

4 second in milliseconds

public

5 second in milliseconds

public

V WalkEndedReasons: {failedToRefindParent: number, noMoreChildren: number, failedToRefindChild: number, failedToFindFirstParent: number, failedToFindFirstChild: number}

Reasons why a walk has ended

public
public
public
public
public

T RawBehaviorIterator: AsyncIterator<RawBehaviorStepResults>|AsyncIterableIterator<RawBehaviorStepResults>

public
public
public
public
public

T WaitForSelectorOptions(cntx: SomeElement | Document, options: WaitForOptions): Object

public
public

T 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
public
public
public
public
public
public
public
public