Host Class
Remote Dalek host proxy
Item Index
Methods
Methods
_createServer
-
request
-
response
Dispatches all incoming requests, possible endpoints local webdriver server, browser launcher, browser shutdown handler
Parameters:
-
request
ObjectRequest from the dalek remote caller
-
response
ObjectResponse to the dalek remote caller
_extractBrowser
-
url
Extracts the browser that should be launched from the launch url request
Parameters:
-
url
StringUrl to parse
Returns:
Extracted browser
_generateProxyRequestOptions
-
header
-
method
-
url
Generates the request options from the incoming request that should then be forwared to the local webdriver server
Parameters:
-
header
ObjectHeader meta data
-
method
StringHTTP method
-
url
StringWebriver server endpoint url
Returns:
Request options
_getLocalIp
()
String
private
Gets the local ip address (should be the IPv4 address where the runner is accessible from)
Returns:
Local IP address
_grepIp
()
private
chainable
Tries to find the local IP address
_launcher
-
request
-
response
Launches the local browser
Parameters:
-
request
ObjectRequest from the dalek remote caller
-
response
ObjectResponse to the dalek remote caller
_launcher
-
response
Shuts the local browser down, end the otherwise hanging request
Parameters:
-
response
ObjectResponse to the dalek remote caller
_loadBrowserModule
-
browser
-
response
Requires the local browser module & returns it
Parameters:
-
browser
StringName of the browser to load
-
response
ObjectResponse to the dalek remote caller
Returns:
The local browser module
_onBrowserLaunch
-
browser
-
response
Stores network data from the local browser instance, sends browser specific data to the client
Parameters:
-
browser
StringName of the browser to load
-
response
ObjectResponse to the dalek remote caller
_onProxyRequest
-
request
-
response
-
res
Proxies remote data to the webdriver server
Parameters:
-
request
ObjectRequest from the dalek remote caller
-
response
ObjectResponse to the dalek remote caller
-
res
ObjectResponse to the local webdriver server
_onProxyRequest
-
request
-
response
-
res
-
chunks
Handles data exchange between the client and the local webdriver server
Parameters:
-
request
ObjectRequest from the dalek remote caller
-
response
ObjectResponse to the dalek remote caller
-
res
ObjectResponse to the local webdriver server
-
chunks
ArrayArray of received data pieces that should be forwarded to the local webdriver server
_onRequestDataChunk
-
chunk
Proxies data from the local webdriver server to the client
Parameters:
-
chunk
BufferChunk of the incoming request data
kill
()
Object
Shutdown the proxy server
Returns:
Promise
run
-
opts
Starts the remote proxy server, prepares the config
Parameters:
-
opts
ObjectConfiguration options
Properties
bro
Object
Instance of the local browser
Default: null
configuration
Object
Local configuration
Default: {}
defaultPort
Integer
Default port that the Dalek remote server is linking against
Default: 9020
proxyRequest
http.IncomingMessage
Incoming message that needs to be proxied to the local webdriver server
Default: null
remoteHost
String
Host address of the called webdriver server
Default: null
remoteId
String
Identifier of the remote client
Default: null
remotePath
String
Path of the webdriver server endpoint
Default: null
remotePort
String
Port of the called webdriver server
Default: null
remoteSecret
String
Secret that got emitted by the remote instance
Default: null
reporterEvents
EventEmitter2
Instance of the reporter event emitter
Default: null
secret
String
Secret that is stored in the local instance
Default: null