Class: Appium::Core::DirectConnections
- Inherits:
-
Object
- Object
- Appium::Core::DirectConnections
- 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
-
#host ⇒ string
readonly
Returns a host name such as io.appium.
-
#path ⇒ string
readonly
Returns a path for webdriver such as
/hub/wd
. -
#port ⇒ integer
readonly
Returns a port number such as 443.
-
#protocol ⇒ string
readonly
Returns a protocol such as http/https.
Instance Method Summary collapse
-
#initialize(capabilities) ⇒ DirectConnections
constructor
A new instance of DirectConnections.
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
#host ⇒ string (readonly)
Returns a host name such as io.appium
88 89 90 |
# File 'lib/appium_lib_core/driver.rb', line 88 def host @host end |
#path ⇒ string (readonly)
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 |
#port ⇒ integer (readonly)
Returns a port number such as 443
91 92 93 |
# File 'lib/appium_lib_core/driver.rb', line 91 def port @port end |
#protocol ⇒ string (readonly)
Returns a protocol such as http/https
85 86 87 |
# File 'lib/appium_lib_core/driver.rb', line 85 def protocol @protocol end |