Class: TextDocumentObject

Inherits:
Object
  • Object
show all
Includes:
PageHelper, Utilities, Workflows
Defined in:
lib/sakai-cle-test-api/data_objects/resource.rb

Instance Method Summary collapse

Methods included from Workflows

menu_link, #open_my_site_by_name

Methods included from Utilities

#current_hour, #current_month, #current_year, #get_filename, #in_15_minutes, #last_hour, #last_month, #last_year, #make, #make_date, #next_hour, #next_month, #next_year, #on_page, #random_alphanums, #random_alphanums_plus, #random_email, #random_high_ascii, #random_letters, #random_multiline, #random_nicelink, #random_string, #random_xss_string, #tomorrow, #yesterday

Methods included from PageHelper

#make, #on, #visit, #wait_until

Constructor Details

#initialize(browser, opts = {}) ⇒ TextDocumentObject

Returns a new instance of TextDocumentObject.



172
173
174
175
176
177
178
179
# File 'lib/sakai-cle-test-api/data_objects/resource.rb', line 172

def initialize(browser, opts={})
  @browser = browser

  defaults = {}
  options = defaults.merge(opts)
  @site = options[:site]
  raise "You must specify a Site for your Text Document" if @site==nil
end

Instance Method Details

#createObject



181
182
183
184
# File 'lib/sakai-cle-test-api/data_objects/resource.rb', line 181

def create
  open_my_site_by_name @site unless @browser.title=~/#{@site}/
  resources unless @browser.title=~/Resources$/
end