Class: Kookaburra::UIDriver::UIComponent::AddressBar

Inherits:
Kookaburra::UIDriver::UIComponent show all
Defined in:
lib/kookaburra/ui_driver/ui_component/address_bar.rb

Overview

This represents the browser's address bar, so that you can tell your tests to explicitly visit a URL.

Instance Attribute Summary

Attributes inherited from Kookaburra::UIDriver::UIComponent

#browser, #configuration, #options

Instance Method Summary collapse

Methods inherited from Kookaburra::UIDriver::UIComponent

#component_locator, #component_path, #detect_server_error!, #initialize, #this_element, #url, #visible?

Methods included from HasUIComponents

#ui_component

Methods included from Assertion

#assert

Constructor Details

This class inherits a constructor from Kookaburra::UIDriver::UIComponent

Instance Method Details

#go_to(addressable) ⇒ Object

Causes the browser to explicitly navigate to the given url.

object that responds to #url and returns a URL string

Parameters:

  • addressable (String, #url)

    Can be either a URL string or an



13
14
15
16
17
18
19
20
# File 'lib/kookaburra/ui_driver/ui_component/address_bar.rb', line 13

def go_to(addressable)
  if addressable.respond_to?(:url)
    browser.visit(addressable.url)
  else
    browser.visit(addressable.to_s)
  end
  detect_server_error!
end