Class: Superbot::CLI::RunCommand
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Superbot::CLI::RunCommand
- Includes:
- Validations
- Defined in:
- lib/superbot/cli/run_command.rb
Instance Method Summary collapse
Methods included from Validations
#validates_browser_type, #validates_project_path
Instance Method Details
#execute ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/superbot/cli/run_command.rb', line 17 def execute script = File.read(File.join(path, 'main.rb')) webdriver_proxy = Superbot::Web.new(webdriver_endpoint: Superbot.webdriver_endpoint(browser)) webdriver_proxy.run_async_after_running! puts "🤖 active" chromedriver = Kommando.run_async 'chromedriver --silent --port=9515' if browser == 'local' = Superbot::Capybara::Runner.new(browser: browser, region: region) .run(script) puts .test_result puts "Press ENTER to exit" $stdin.gets ensure chromedriver&.kill webdriver_proxy&.quit! &.kill_session end |