lib/appium_lib/driver.rb in appium_lib-4.1.0 vs lib/appium_lib/driver.rb in appium_lib-5.0.0
- old
+ new
@@ -221,23 +221,36 @@
class Driver
@@loaded = false
# attr readers are promoted to global scope. To avoid clobbering, they're
# made available via the driver_attributes method
+ #
+ # attr_accessor is repeated for each one so YARD documents them properly.
+
# The amount to sleep in seconds before every webdriver http call.
- attr_accessor :global_webdriver_http_sleep,
- :caps,
- :custom_url,
- :export_session,
- :default_wait,
- :last_waits,
- :sauce_username,
- :sauce_access_key,
- :appium_port,
- :appium_device,
- :appium_debug
+ attr_accessor :global_webdriver_http_sleep
+ # Selenium webdriver capabilities
+ attr_accessor :caps
+ # Custom URL for the selenium server
+ attr_accessor :custom_url
+ # Export session id to textfile in /tmp for 3rd party tools
+ attr_accessor :export_session
+ # Default wait time for elements to appear
+ attr_accessor :default_wait
+ # Array of previous wait time values
+ attr_accessor :last_waits
+ # Username for use on Sauce Labs
+ attr_accessor :sauce_username
+ # Access Key for use on Sauce Labs
+ attr_accessor :sauce_access_key
+ # Appium's server port
+ attr_accessor :appium_port
+ # Device type to request from the appium server
+ attr_accessor :appium_device
+ # Boolean debug mode for the Appium Ruby bindings
+ attr_accessor :appium_debug
# Creates a new driver
#
# ```ruby
# require 'rubygems'
@@ -473,12 +486,11 @@
end
rescue Errno::ECONNREFUSED
raise 'ERROR: Unable to connect to Appium. Is the server running?'
end
- # Set implicit wait by default unless we're using Pry.
- @driver.manage.timeouts.implicit_wait = @default_wait unless defined? Pry
+ @driver.manage.timeouts.implicit_wait = @default_wait
@driver
end
# Set implicit wait and default_wait to zero.
@@ -590,6 +602,6 @@
end # module Appium
# Paging in Pry is annoying :q required to exit.
# With pager disabled, the output is similar to IRB
# Only set if Pry is defined.
-Pry.config.pager = false if defined?(Pry)
+Pry.config.pager = false if defined?(Pry)
\ No newline at end of file