Class: Blogger

Inherits:
BasePage show all
Defined in:
lib/sambal-cle/page_objects/blogger.rb

Overview

The top page of a Site’s Blogger feature.

Instance Method Summary collapse

Methods inherited from BasePage

basic_page_elements, button, damballa, frame_element, link

Instance Method Details

#post_private?(post_title) ⇒ Boolean

Returns true if the specified post title exists in the list. Otherwise returns false.

Returns:

  • (Boolean)


15
16
17
# File 'lib/sambal-cle/page_objects/blogger.rb', line 15

def post_private?(post_title)
  frm.table(:class=>"tableHeader").row(:text=>/#{Regexp.escape(post_title)}/).image(:alt=>"p").exist?
end

#post_titlesObject

Returns an array containing the displayed post titles (as string objects).



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/sambal-cle/page_objects/blogger.rb', line 26

def post_titles
  titles = []
  if frm.table(:class=>"tableHeader").exist?
    table = frm.table(:class=>"tableHeader")
    table.rows.each do |row|
      if row.link(:class=>"aTitleHeader").exist?
        titles << row.link(:class=>"aTitleHeader").text
      end
    end
  end
  return titles
end