Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/howitzer/helpers.rb

Instance Method Summary collapse

Instance Method Details

#as_email_classObject

Returns email class


222
223
224
# File 'lib/howitzer/helpers.rb', line 222

def as_email_class
  as_class('Email')
end

#as_page_classObject

Returns page class


213
214
215
# File 'lib/howitzer/helpers.rb', line 213

def as_page_class
  as_class('Page')
end

#givenObject

Returns page instance


195
196
197
# File 'lib/howitzer/helpers.rb', line 195

def given
  as_page_class.given
end

#open(*args) ⇒ Object

Delegates WebPage.open method. Useful in cucumber step definitions

Parameters:

  • *args - Url to be opened


186
187
188
# File 'lib/howitzer/helpers.rb', line 186

def open(*args)
  as_page_class.open(*args)
end

#wait_for_openedObject

Waits until page is opened or raise error


204
205
206
# File 'lib/howitzer/helpers.rb', line 204

def wait_for_opened
  as_page_class.wait_for_opened
end