Class: Sapphire::WebAbstractions::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/sapphire/WebAbstractions/Controls/Base/Page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(browser) ⇒ Page

Returns a new instance of Page.



7
8
9
10
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 7

def initialize(browser)
  @browser = browser
  @fields = []
end

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



5
6
7
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 5

def fields
  @fields
end

Instance Method Details

#Button(*args) ⇒ Object



28
29
30
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 28

def Button(*args)
  @fields << { args.first => Button.new(@browser, args[1]) }
end

#CheckBox(*args) ⇒ Object



24
25
26
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 24

def CheckBox(*args)
  @fields << { args.first => CheckBox.new(@browser, args[1]) }
end


12
13
14
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 12

def DropDown(*args)
  @fields << { args.first => DropDown.new(@browser, args[1]) }
end


40
41
42
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 40

def Hyperlink(*args)
  @fields << { args.first => Hyperlink.new(@browser, args[1]) }
end

#Image(*args) ⇒ Object



36
37
38
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 36

def Image(*args)
  @fields << { args.first => Image.new(@browser, args[1]) }
end

#Label(*args) ⇒ Object



32
33
34
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 32

def Label(*args)
  @fields << { args.first => Label.new(@browser, args[1]) }
end

#List(*args) ⇒ Object



44
45
46
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 44

def List(*args)
  @fields << { args.first => List.new(@browser, args[1]) }
end

#RadioButton(*args) ⇒ Object



20
21
22
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 20

def RadioButton(*args)
  @fields << { args.first => RadioButton.new(@browser, args[1]) }
end

#TextBox(*args) ⇒ Object



16
17
18
# File 'lib/sapphire/WebAbstractions/Controls/Base/Page.rb', line 16

def TextBox(*args)
  @fields << { args.first => TextBox.new(@browser, args[1]) }
end