Class: Portfolios

Inherits:
BasePage show all
Defined in:
lib/sakai-cle-test-api/page_objects/portfolios.rb

Instance Method Summary collapse

Methods inherited from BasePage

basic_page_elements, frame_element

Methods inherited from PageMaker

element, expected_element, expected_title, #initialize, #method_missing, page_url

Constructor Details

This class inherits a constructor from PageMaker

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PageMaker

Instance Method Details

#create_new_portfolioObject



10
11
12
13
# File 'lib/sakai-cle-test-api/page_objects/portfolios.rb', line 10

def create_new_portfolio
  frm.link(:text=>"Create New Portfolio").click
  AddPortfolio.new(@browser)
end

#listObject



15
16
17
18
19
20
21
22
# File 'lib/sakai-cle-test-api/page_objects/portfolios.rb', line 15

def list
  list = []
  frm.table(:class=>"listHier ospTable").rows.each do |row|
    list << row[0].text
  end
  list.delete_at(0)
  return list
end

#shared(portfolio_name) ⇒ Object



24
25
26
# File 'lib/sakai-cle-test-api/page_objects/portfolios.rb', line 24

def shared(portfolio_name)
  frm.table(:class=>"listHier ospTable").row(:text=>/#{Regexp.escape(portfolio_name)}/)[5].text
end