Sha256: 6e37ab25ee49a6bae2e6156e1a1ecc2147cdeb57e4d8e39c3105ad3d31e4fc1a

Contents?: true

Size: 685 Bytes

Versions: 8

Compression:

Stored size: 685 Bytes

Contents

#!/usr/bin/env ruby
$LOAD_PATH << "./lib"

require "rspec"
# rubocop:disable Style/MixinUsage
include RSpec::Matchers
# rubocop:enable Style/MixinUsage

require "testable"

class PageReady
  include Testable

  url_is "https://veilus.herokuapp.com"

  element :logo, id: 'site-'
  element :login_form, id: 'openski'

  page_ready { [logo.exists?, "Test Gorilla logo is not present"] }
end

Testable.start_browser :firefox

page = PageReady.new

page.visit

# Uncomment one of these at a time to see that the page_ready part
# is working. The element definitions above are purposely incorrect.

# page.when_ready { page.login_form.click }
# page.login_form.click

Testable.quit_browser

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
testable-1.0.0 examples/testable-watir-ready.rb
testable-0.10.0 examples/testable-watir-ready.rb
testable-0.9.0 examples/testable-watir-ready.rb
testable-0.8.0 examples/testable-watir-ready.rb
testable-0.7.0 examples/testable-watir-ready.rb
testable-0.6.0 examples/testable-watir-ready.rb
testable-0.5.0 examples/testable-watir-ready.rb
testable-0.4.0 examples/testable-watir-ready.rb