Module: Rufus::Accessors

Defined in:
lib/rufus/accessors/view.rb,
lib/rufus/accessors/table.rb,
lib/rufus/accessors/accessors.rb

Defined Under Namespace

Classes: Table, View

Instance Method Summary collapse

Instance Method Details

#alert(name, locator) ⇒ Object



25
26
27
# File 'lib/rufus/accessors/accessors.rb', line 25

def alert(name, locator)
  view(name, locator)
end

#button(name, locator) ⇒ Object



21
22
23
# File 'lib/rufus/accessors/accessors.rb', line 21

def button(name, locator)
  view(name, locator)
end

#label(name, locator) ⇒ Object



13
14
15
# File 'lib/rufus/accessors/accessors.rb', line 13

def label(name, locator)
  view(name, locator)
end

#table(name, locator) ⇒ Object



29
30
31
32
33
# File 'lib/rufus/accessors/accessors.rb', line 29

def table(name, locator)
  define_method("#{name}_view") do
    Rufus::Accessors::Table.new(locator)
  end
end

#text(name, locator) ⇒ Object



17
18
19
# File 'lib/rufus/accessors/accessors.rb', line 17

def text(name, locator)
  view(name, locator)
end

#view(name, locator) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/rufus/accessors/accessors.rb', line 4

def view(name, locator)
  define_method("#{name}_view") do
    Rufus::Accessors::View.new(locator)
  end
  define_method("#{name}") do
    Rufus::Accessors::View.new(locator).click
  end
end