API Docs for: 0.0.3
Show:

Browser.IosDriver Class

Defined in: index.js:34
Module: DalekJS

This module is a browser plugin for DalekJS. It provides all a WebDriverServer & browser launcher for Safari on iOS.

At the moment this only works with the IPhone

The browser plugin can be installed with the following command:

$ npm install dalek-browser-ios --save-dev

You can use the browser plugin by adding a config option to the your Dalekfile

"browsers": ["ios"]

Or you can tell Dalek that it should test in this browser via the command line:

$ dalek mytest.js -b ios

The Webdriver Server tries to open Port 9003 by default, if this port is blocked, it tries to use a port between 9004 & 9093 You can specifiy a different port from within your Dalekfile like so:

"browsers": {
  "ios": {
    "port": 5555 
  }
}

It is also possible to specify a range of ports:

"browsers": {
  "ios": {
    "portRange": [6100, 6120] 
  }
}

If you would like to test on the IPad (IPhone) emulator, you can simply apply a snd. argument, which defines the browser type:

$ dalek mytest.js -b ios:ipad

Methods

_afterAppiumStarted

(
  • deferred
  • appiumServer
)
private chainable

Defined in index.js:466

Stores the appium server reference, restores the stdout logs

Parameters:

  • deferred Object

    Promise

  • appiumServer Object

    Appium server instance

_checkAppiumPorts

(
  • browser
)
private chainable

Defined in index.js:513

Process user defined appium ports

Parameters:

  • browser Object

    Browser configuration

_checkUserDefinedPorts

(
  • browser
)
private chainable

Defined in index.js:498

Process user defined ports

Parameters:

  • browser Object

    Browser configuration

_checkWebhookPorts

(
  • browser
)
private chainable

Defined in index.js:540

Process user defined webhook ports

Parameters:

  • browser Object

    Browser configuration

_filterProcessItem

(
  • item
)
Bool | String private

Defined in index.js:622

Filters process list items

Parameters:

  • item String

    Process list entry

Returns:

Bool | String:

Process item or false

_kill

(
  • err
  • result
)
private chainable

Defined in index.js:348

Kills the non blacklisted simulator processes & restores the stderr handler

Parameters:

  • err Object | Null

    Error or null

  • result Array

    List of currently running simulator processes

_killProcess

(
  • processID
)
private chainable

Defined in index.js:367

Checks a blacklist & kills the process when not found

Parameters:

  • processID Integer

    Process ID

_listProcesses

(
  • deferred
  • err
  • port
)
private chainable

Defined in index.js:395

Checks & switches the appium server port, scans the range for the webhook port

Parameters:

  • deferred Object

    Promise

  • err Object | Null

    Error or null

  • port Integer

    Appium server port to use

_listProcesses

(
  • deferred
  • err
  • port
)
private chainable

Defined in index.js:419

Checks & switches the webhook port, loads a list of running simulator processes

Parameters:

  • deferred Object

    Promise

  • err Object | Null

    Error or null

  • port Integer

    Webhook port to use

_listProcesses

(
  • deferred
  • err
  • result
)
private chainable

Defined in index.js:443

Stores open processes, suppresses stdout logs, starts appium

Parameters:

  • deferred Object

    Promise

  • err Object | Null

    Error or null

  • result Array

    List of currently running simulator processes

_loadAppiumArgs

(
  • appiumArgs
)
Object private

Defined in index.js:483

Configures appium

Parameters:

  • appiumArgs Object

    Appium specific configuration

Returns:

Object:

Modified appium configuration

_processes

(
  • fn
)
private chainable

Defined in index.js:567

Tracks running simulator processes

Parameters:

  • fn Function

    Callback

_reinstantiateLog

() private chainable

Defined in index.js:666

Reinstantiate stdout handler after appium has been started

_scanProcess

(
  • result
  • line
)
private chainable

Defined in index.js:601

Scans and transforms the process list

Parameters:

  • result Array

    Transformed result

  • line String

    Process list entry

_suppressAppiumLogs

() private chainable

Defined in index.js:639

Overwrite default stdout & stderr handler to suppress some appium logs

_transformProcesses

(
  • fn
  • err
  • stdout
)
private chainable

Defined in index.js:582

Transforms the process list output into a json structure

Parameters:

  • fn Function

    Callback

  • err Null | Object

    Error if error, null if not

  • stdout String

    Terminal output

getHost

() String

Defined in index.js:282

Returns the driver host

Returns:

String:

host WebDriver server hostname

getMaxPort

() Integer

Defined in index.js:249

Resolves the maximum range for the driver port

Returns:

Integer:

port Max WebDriver server port range

getPort

() Integer

Defined in index.js:238

Resolves the driver port

Returns:

Integer:

port WebDriver server port

getWebhookPort

() Integer

Defined in index.js:271

Resolves the maximum range for the webhook port

Returns:

Integer:

WebHook Max WebHook port

getWebhookPort

() Integer

Defined in index.js:260

Resolves the webhook port

Returns:

Integer:

WebHook server port

kill

() chainable

Defined in index.js:329

Kills the Appium Server process, kills simulator processses with a slight timeout to prevent appium from throwing errors

launch

(
  • configuration
  • events
  • config
)
Object

Defined in index.js:293

Launches appium & corresponding emulator or device, kicks off the portscanner

Parameters:

  • configuration Object

    Browser configuration

  • events EventEmitter2

    EventEmitter (Reporter Emitter instance)

  • config Dalek.Internal.Config

    Dalek configuration class

Returns:

Object:

promise Browser promise

Properties

appiumArgs

Object

Defined in index.js:185

Special arguments that are needed to invoke appium. These are the defaults, they need to be modified later on

browserTypes

Object

Defined in index.js:216

Different browser types (iPhone / iPad)

desiredCapabilities

Object

Defined in index.js:150

Default desired capabilities that should be transferred when the browser session gets requested

driverDefaults

Object

Defined in index.js:166

Driver defaults, what should the driver be able to access.

host

String

Defined in index.js:128

Default host of the Appium WebDriverServer The host may be overridden with a user configured value

Default: localhost

ipad

Object

Defined in index.js:225

IPad emulator

longName

String

Defined in index.js:96

Verbose version of the browser name

Default: Mobile Safari iOS

path

String

Defined in index.js:140

Root path of the appium webdriver server

Default: /wd/hub

port

Integer

Defined in index.js:106

Default port of the Appium WebDriverServer The port may change, cause the port conflict resolution tool might pick another one, if the default one is blocked

Default: 4723

webhookPort

Integer

Defined in index.js:118

WebHook port

Default: 9003