Class: Appium::Core::Options

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

Overview

This options affects only client side as :appium_lib key.
Read Driver about each attribute

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(appium_lib_opts) ⇒ Options

Returns a new instance of Options.

Parameters:

  • appium_lib_opts (Hash[Symbol, untyped])


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/appium_lib_core/driver.rb', line 46

def initialize(appium_lib_opts)
  @custom_url = appium_lib_opts.fetch :server_url, nil
  @default_wait = appium_lib_opts.fetch :wait, nil
  @enable_idempotency_header = appium_lib_opts.fetch :enable_idempotency_header, true

  @direct_connect = appium_lib_opts.fetch :direct_connect, true

  @port = appium_lib_opts.fetch :port, Driver::DEFAULT_APPIUM_PORT

  # timeout and interval used in ::Appium::Commn.wait/wait_true
  @wait_timeout  = appium_lib_opts.fetch :wait_timeout, ::Appium::Core::Wait::DEFAULT_TIMEOUT
  @wait_interval = appium_lib_opts.fetch :wait_interval, ::Appium::Core::Wait::DEFAULT_INTERVAL

  # to pass it in Selenium.new.
  # 'listener = opts.delete(:listener)' is called in Selenium::Driver.new
  @listener = appium_lib_opts.fetch :listener, nil
end

Instance Attribute Details

#custom_urlString (readonly)

Returns the value of attribute custom_url.

Returns:

  • (String)


42
43
44
# File 'lib/appium_lib_core/driver.rb', line 42

def custom_url
  @custom_url
end

#default_waitInteger (readonly)

Returns the value of attribute default_wait.

Returns:

  • (Integer)


42
43
44
# File 'lib/appium_lib_core/driver.rb', line 42

def default_wait
  @default_wait
end

#direct_connectBoolean (readonly)

Returns the value of attribute direct_connect.

Returns:

  • (Boolean)


42
43
44
# File 'lib/appium_lib_core/driver.rb', line 42

def direct_connect
  @direct_connect
end

#enable_idempotency_headerBoolean (readonly)

Returns the value of attribute enable_idempotency_header.

Returns:

  • (Boolean)


42
43
44
# File 'lib/appium_lib_core/driver.rb', line 42

def enable_idempotency_header
  @enable_idempotency_header
end

#listenerSelenium::WebDriver::Support::AbstractEventListener (readonly)

Returns the value of attribute listener.



42
43
44
# File 'lib/appium_lib_core/driver.rb', line 42

def listener
  @listener
end

#portInteger (readonly)

Returns the value of attribute port.

Returns:

  • (Integer)


42
43
44
# File 'lib/appium_lib_core/driver.rb', line 42

def port
  @port
end

#wait_intervalInteger (readonly)

Returns the value of attribute wait_interval.

Returns:

  • (Integer)


42
43
44
# File 'lib/appium_lib_core/driver.rb', line 42

def wait_interval
  @wait_interval
end

#wait_timeoutInteger (readonly)

Returns the value of attribute wait_timeout.

Returns:

  • (Integer)


42
43
44
# File 'lib/appium_lib_core/driver.rb', line 42

def wait_timeout
  @wait_timeout
end

Instance Method Details

#default_tmp_appium_lib_sessionString

Returns:

  • (String)


66
67
68
# File 'lib/appium_lib_core/driver.rb', line 66

def default_tmp_appium_lib_session
  ::Appium::Core::Base.platform.windows? ? 'C:\\\\Windows\\Temp\\appium_lib_session' : '/tmp/appium_lib_session'
end