Sha256: d0af4e5b7e66f01e3bc60fc4a013b50e986cf3d5d4fd807be258d269732ebdf9

Contents?: true

Size: 493 Bytes

Versions: 5

Compression:

Stored size: 493 Bytes

Contents

require_relative "../sample-app/sample_app"

class AjaxTestEnvironment
  def run
    Thread.abort_on_exception = true
    @example_app = Thread.new { SampleApp.start("127.0.0.1", 4567) }
    poller = Selenium::WebDriver::SocketPoller.new("127.0.0.1", 4567, 60)
    unless poller.connected?
      raise "timed out waiting for SampleApp to launch"
    end

    self
  end

  def stop
    @example_app.kill
  end

end

@server = AjaxTestEnvironment.new
@server.run

at_exit do
  @server.stop
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
page-object-0.6.6 features/support/ajax_text_environment.rb
page-object-0.6.5 features/support/ajax_text_environment.rb
page-object-0.6.4 features/support/ajax_text_environment.rb
page-object-0.6.3 features/support/ajax_text_environment.rb
page-object-0.6.2 features/support/ajax_text_environment.rb