Sha256: 1d2e238348d5317354adeb7b393ce16c5fa24df0041483429e95b6f986ea7cd7

Contents?: true

Size: 787 Bytes

Versions: 20

Compression:

Stored size: 787 Bytes

Contents

module Watir
  module Navigation
    #
    # Goes to the given URL.
    #
    # @example
    #   browser.goto "watir.github.io"
    #
    # @param [String] uri The url.
    # @return [String] The url you end up at.
    #

    def goto(uri)
      uri = "http://#{uri}" unless uri =~ URI::DEFAULT_PARSER.make_regexp

      @driver.navigate.to uri
      @after_hooks.run

      uri
    end

    #
    # Navigates back in history.
    #

    def back
      @driver.navigate.back
      @after_hooks.run
    end

    #
    # Navigates forward in history.
    #

    def forward
      @driver.navigate.forward
      @after_hooks.run
    end

    #
    # Refreshes current page.
    #

    def refresh
      @driver.navigate.refresh
      @after_hooks.run
    end
  end # Navigation
end # Watir

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
watir-7.1.0 lib/watir/navigation.rb
watir-7.0.0 lib/watir/navigation.rb
watir-7.0.0.beta5 lib/watir/navigation.rb
watir-7.0.0.beta4 lib/watir/navigation.rb
watir-7.0.0.beta3 lib/watir/navigation.rb
watir-7.0.0.beta2 lib/watir/navigation.rb
watir-7.0.0.beta1 lib/watir/navigation.rb
watir-6.19.1 lib/watir/navigation.rb
watir-6.19.0 lib/watir/navigation.rb
watir-6.18.0 lib/watir/navigation.rb
watir-6.17.0 lib/watir/navigation.rb
watir-6.16.5 lib/watir/navigation.rb
watir-6.16.4 lib/watir/navigation.rb
watir-6.16.3 lib/watir/navigation.rb
watir-6.16.2 lib/watir/navigation.rb
watir-6.16.1 lib/watir/navigation.rb
watir-6.16.0 lib/watir/navigation.rb
watir-6.15.1 lib/watir/navigation.rb
watir-6.15.0 lib/watir/navigation.rb
watir-6.14.0 lib/watir/navigation.rb