Class: Appium::Core::DirectConnections

Inherits:
Object
  • Object
show all
Defined in:
lib/appium_lib_core/driver.rb

Overview

DirectConnections has capabilities of directConnect

Constant Summary collapse

KEYS =
{
  protocol: 'directConnectProtocol',
  host: 'directConnectHost',
  port: 'directConnectPort',
  path: 'directConnectPath'
}.freeze
W3C_KEYS =
{
  protocol: 'appium:directConnectProtocol',
  host: 'appium:directConnectHost',
  port: 'appium:directConnectPort',
  path: 'appium:directConnectPath'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capabilities) ⇒ DirectConnections

Returns a new instance of DirectConnections.



96
97
98
99
100
101
# File 'lib/appium_lib_core/driver.rb', line 96

def initialize(capabilities)
  @protocol = capabilities[W3C_KEYS[:protocol]] || capabilities[KEYS[:protocol]]
  @host = capabilities[W3C_KEYS[:host]] || capabilities[KEYS[:host]]
  @port = capabilities[W3C_KEYS[:port]] || capabilities[KEYS[:port]]
  @path = capabilities[W3C_KEYS[:path]] || capabilities[KEYS[:path]]
end

Instance Attribute Details

#hoststring (readonly)

Returns a host name such as io.appium

Returns:

  • (string)

    Returns a host name such as io.appium



88
89
90
# File 'lib/appium_lib_core/driver.rb', line 88

def host
  @host
end

#pathstring (readonly)

Returns a path for webdriver such as /hub/wd

Returns:

  • (string)

    Returns a path for webdriver such as /hub/wd



94
95
96
# File 'lib/appium_lib_core/driver.rb', line 94

def path
  @path
end

#portinteger (readonly)

Returns a port number such as 443

Returns:

  • (integer)

    Returns a port number such as 443



91
92
93
# File 'lib/appium_lib_core/driver.rb', line 91

def port
  @port
end

#protocolstring (readonly)

Returns a protocol such as http/https

Returns:

  • (string)

    Returns a protocol such as http/https



85
86
87
# File 'lib/appium_lib_core/driver.rb', line 85

def protocol
  @protocol
end