API Docs for: 0.2.7
Show:

Stitching Class

Module: Helpers
Parent Module: WebDriver

Stitching object

Constructor

Stitching

(
  • driver
)

Parameters:

Methods

_determineNeedsStitching

(
  • [options]
)
Boolean private

Determines if the browser needs stitching due to the fact of taking only view-port screenshots instead of whole document ones.

Note: horizontalPadding is any element that extents horizontally outside of the document, i.e. negative absolute position.

Parameters:

  • [options] Object optional
    • [horizontalPadding=0] Int optional

      Padding of the document

Returns:

_execute

(
  • script
  • [args]
)
private

Executes a script in the browser and returns the result.

This is a convenience method for accessing the execute method.

Parameters:

Returns:

:

_logMethodCall

(
  • event
)
private

Logs a method call by an event

Parameters:

_requestJSON

(
  • method
  • path
  • [body]
)
private

Performs a context dependent JSON request for the current session. The result is parsed for errors.

Parameters:

Returns:

:

doesNeedStitching

(
  • [options]
)
Number

Is stitching needed for browser?

Some browsers (i.e. Chrome) do only take a screenshot of the view-port instead of the whole document as per standard. This information will then be cached for each driver instance, determining this only once per instance.

Parameters:

  • [options] Object optional
    • [horizontalPadding=0] Int optional

      Padding of the document

Returns: