Class: UtilityCommands
- Inherits:
-
Thor
- Object
- Thor
- UtilityCommands
- Defined in:
- lib/commands/utility_commands.rb
Overview
:reek:FeatureEnvy { enabled: false } :reek:UtilityFunction { enabled: false }
Instance Method Summary collapse
- #browser(default_browser = nil) ⇒ Object
- #browser_options(*opts) ⇒ Object
- #path(default_path) ⇒ Object
- #platform(platform) ⇒ Object
- #raid ⇒ Object
- #start_appium ⇒ Object
- #url(default_url) ⇒ Object
Instance Method Details
#browser(default_browser = nil) ⇒ Object
34 35 36 37 38 |
# File 'lib/commands/utility_commands.rb', line 34 def browser(default_browser = nil) Utilities.browser = default_browser if default_browser = [:opts] () if || [:delete] end |
#browser_options(*opts) ⇒ Object
44 45 46 47 |
# File 'lib/commands/utility_commands.rb', line 44 def (*opts) Utilities. = opts unless opts.empty? Utilities. if [:delete] end |
#path(default_path) ⇒ Object
17 18 19 20 |
# File 'lib/commands/utility_commands.rb', line 17 def path(default_path) type = .empty? ? 'page' : .keys.first Utilities.send("#{type}_path=", default_path) end |
#platform(platform) ⇒ Object
72 73 74 |
# File 'lib/commands/utility_commands.rb', line 72 def platform(platform) Utilities.platform = platform end |
#raid ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/commands/utility_commands.rb', line 55 def raid = [:opts] if [:parallel] Utilities.parallel_run() else Utilities.run() end end |
#start_appium ⇒ Object
77 78 79 |
# File 'lib/commands/utility_commands.rb', line 77 def start_appium system 'appium --base-path /wd/hub' end |
#url(default_url) ⇒ Object
24 25 26 |
# File 'lib/commands/utility_commands.rb', line 24 def url(default_url) Utilities.url = default_url end |