Class: Watirmark::Page

Inherits:
Object show all
Extended by:
PageDefinition
Defined in:
lib/watirmark/page/page.rb

Instance Attribute Summary collapse

Attributes included from PageDefinition

#kwd_metadata, #kwds, #perms

Attributes included from ProcessPageDefinition

#process_page_active_page_method, #process_page_navigate_method, #process_page_submit_method

Instance Method Summary collapse

Methods included from PageDefinition

browser_exists?, inherited, keyword, keyword_alias, keyword_metadata, populate_keyword, private_keyword, verify_keyword

Methods included from ProcessPageDefinition

#always_activate_parent, #process_page_alias

Constructor Details

#initialize(browser = self.class.browser) ⇒ Page

Returns a new instance of Page.



10
11
12
13
14
# File 'lib/watirmark/page/page.rb', line 10

def initialize(browser=self.class.browser)
  @browser = browser
  @keyed_elements = []
  create_keyword_methods
end

Instance Attribute Details

#browserObject

Returns the value of attribute browser.



7
8
9
# File 'lib/watirmark/page/page.rb', line 7

def browser
  @browser
end

#keyed_elementsObject (readonly)

Returns the value of attribute keyed_elements.



8
9
10
# File 'lib/watirmark/page/page.rb', line 8

def keyed_elements
  @keyed_elements
end

Instance Method Details

#keywordsObject



16
17
18
# File 'lib/watirmark/page/page.rb', line 16

def keywords
  self.class.keywords
end

#native_keywordsObject



20
21
22
# File 'lib/watirmark/page/page.rb', line 20

def native_keywords
  self.class.native_keywords
end

#process_page(x) ⇒ Object



28
29
30
# File 'lib/watirmark/page/page.rb', line 28

def process_page(x)
  process_pages.each { |page| return page if page.name == x }
end

#process_pagesObject



24
25
26
# File 'lib/watirmark/page/page.rb', line 24

def process_pages
  self.class.process_pages
end