Sha256: 1f75b056d12d7ea5a69a2ced68cb718f31b35afc8dde2daf2484a9605c3ad1e1

Contents?: true

Size: 738 Bytes

Versions: 7

Compression:

Stored size: 738 Bytes

Contents

require 'kookaburra/ui_driver/ui_component'

class Kookaburra
  class UIDriver
    class UIComponent
      # This represents the browser's address bar, so that you can tell your
      # tests to explicitly visit a URL.
      class AddressBar < UIComponent
        # Causes the browser to explicitly navigate to the given url.
        #
        # @param [String, #url] addressable Can be either a URL string or an
        # object that responds to #url and returns a URL string
        def go_to(addressable)
          if addressable.respond_to?(:url)
            browser.visit(addressable.url)
          else
            browser.visit(addressable.to_s)
          end
          detect_server_error!
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kookaburra-3.0.1 lib/kookaburra/ui_driver/ui_component/address_bar.rb
kookaburra-3.0.0 lib/kookaburra/ui_driver/ui_component/address_bar.rb
kookaburra-2.0.0 lib/kookaburra/ui_driver/ui_component/address_bar.rb
kookaburra-1.3.1 lib/kookaburra/ui_driver/ui_component/address_bar.rb
kookaburra-1.3.0 lib/kookaburra/ui_driver/ui_component/address_bar.rb
kookaburra-1.2.3 lib/kookaburra/ui_driver/ui_component/address_bar.rb
kookaburra-1.2.2 lib/kookaburra/ui_driver/ui_component/address_bar.rb