API Docs for: 0.2.7
Show:

DevicePixelRatio Class

Module: Helpers
Parent Module: WebDriver

Device-Pixel-Ratio object

Constructor

DevicePixelRatio

(
  • driver
)

Parameters:

Methods

_determineDevicePixelRatio

(
  • [options]
)
Number private

Determines the device-pixel-ratio of the browser.

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:

:

getDevicePixelRatio

(
  • [options]
)
Number

Gets the device-pixel-ratio of the browser. If this info is not available yet, then it will determine it. It will then be cached for each driver instance, determining this only once per instance.

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: