module Support
  module Browser
    # Browser that runs on a node on the in-house grid.
    class Grid < Base
      include RemoteHelpers

      def initialize(configs)
        @name = configs.delete(:name)
        @dimensions = configs.delete(:dimensions)

        grid_options = configs.delete(:grid_options)
        @url = "http://#{grid_options[:ip]}:#{grid_options[:port]}/wd/hub"
      end

      def stop
        rescued_stop
      end
    end
  end
end
