Class: SiteSetup

Inherits:
SiteSetupBase show all
Defined in:
lib/sambal-cle/page_objects/site_setup.rb

Overview

The Site Setup page - a.k.a., link class=>“icon-sakai-sitesetup”

Instance Method Summary collapse

Methods inherited from SiteSetupBase

menu_elements

Methods inherited from BasePage

basic_page_elements, button, damballa, frame_element, link

Instance Method Details

#delete(site_name) ⇒ Object

Searches for the specified site, then checks the site, clicks the delete button, and instantiates the DeleteSite class.



67
68
69
70
71
72
# File 'lib/sambal-cle/page_objects/site_setup.rb', line 67

def delete(site_name)
  search_field.value=site_name
  frm.button(:value=>"Search").click
  frm.checkbox(:name=>"selectedMembers").set
  frm.div(:class=>"portletBody").link(:text, "Delete").click
end

#edit(site_name) ⇒ Object

Searches for the specified site, then selects the specified Site’s checkbox. Then clicks the Edit button



49
50
51
52
53
54
# File 'lib/sambal-cle/page_objects/site_setup.rb', line 49

def edit(site_name)
  search_field.value=Regexp.escape(site_name)
  frm.button(:value=>"Search").click
  frm.div(:class=>"portletBody").checkbox(:name=>"selectedMembers").set
  frm.div(:class=>"portletBody").link(:text, "Edit").click
end

#search(site_name) ⇒ Object

Enters the specified site name string in the search field, clicks the Search button, then reinstantiates the Class due to the page refresh.



59
60
61
62
# File 'lib/sambal-cle/page_objects/site_setup.rb', line 59

def search(site_name)
  search_field.set site_name
  frm.button(:value, "Search").click
end

#site_titlesObject

Returns an Array object containing strings of all Site titles displayed on the web page.



76
77
78
79
80
81
82
83
# File 'lib/sambal-cle/page_objects/site_setup.rb', line 76

def site_titles
  titles = []
  sites_table = frm.table(:id=>"siteList")
  1.upto(sites_table.rows.size-1) do |x|
    titles << sites_table[x][1].text
  end
  return titles
end