Class: Howitzer::Web::Section

Inherits:
BaseSection show all
Defined in:
lib/howitzer/web/section.rb

Overview

This class uses for named sections which possible to reuse in different pages

Constant Summary

Constants included from CapybaraMethodsProxy

CapybaraMethodsProxy::PROXIED_CAPYBARA_METHODS

Instance Attribute Summary

Attributes inherited from BaseSection

#parent

Class Method Summary collapse

Methods inherited from BaseSection

#initialize

Methods included from CapybaraMethodsProxy

#click_alert_box

Methods included from IframeDsl

included

Methods included from CapybaraContextHolder

#capybara_context

Methods included from SectionDsl

included

Methods included from ElementDsl

included

Constructor Details

This class inherits a constructor from Howitzer::Web::BaseSection

Class Method Details

.me(*args) ⇒ Object

DSL method which specifies section container selector represented by HTML element. Any elements described in sections will start in this HTML element.

Examples:

class MenuSection < Howitzer::Web::Section
  me :xpath, ".//*[@id='panel']"
end

Parameters:

  • args (Array)

    original Capybara arguments. For details, see `Capybara::Node::Finders#all.

Raises:

  • (ArgumentError)

    if no arguments were passed



20
21
22
23
# File 'lib/howitzer/web/section.rb', line 20

def me(*args)
  raise ArgumentError, 'Finder arguments are missing' if args.blank?
  @default_finder_args = args
end