Class: PortfoliosUploadFiles

Inherits:
BasePage
  • Object
show all
Defined in:
lib/sambal-cle/page_objects/portfolio_templates.rb

Overview

TODO - This class can probably be removed completely

Constant Summary collapse

@@filex =
0

Instance Method Summary collapse

Methods inherited from BasePage

basic_page_elements, button, damballa, frame_element, link

Instance Method Details

#file_to_upload(file_name, file_path) ⇒ Object

Note that the file_to_upload method can be used multiple times, but it assumes that the add_another_file method is used before it, every time except before the first time.



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

def file_to_upload(file_name, file_path)
  frm.file_field(:id, "content_#{@@filex}").set(file_path + file_name)
  @@filex+=1
end

#upload_files_nowObject

Clicks the Upload Files Now button and instantiates the PortfolioAttachFiles Class.



74
75
76
77
78
79
# File 'lib/sambal-cle/page_objects/portfolio_templates.rb', line 74

def upload_files_now
  frm.button(:value=>"Upload Files Now").click
  sleep 1 # TODO - use a wait clause here
  @@filex=0
  PortfolioAttachFiles.new(@browser)
end