Module: EditProfileMethods

Includes:
PageObject
Defined in:
lib/kuali-sakai-common-lib/profile.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.page_elements(identifier) ⇒ Object



36
37
38
39
40
41
42
43
44
45
# File 'lib/kuali-sakai-common-lib/profile.rb', line 36

def self.page_elements(identifier)
  in_frame(identifier) do |frame|
    text_field(:first_name, :id=>"editProfileForm:first_name", :frame=>frame)
    text_field(:last_name, :id=>"editProfileForm:lname", :frame=>frame)
    text_field(:nickname, :id=>"editProfileForm:nickname", :frame=>frame)
    text_field(:position, :id=>"editProfileForm:position", :frame=>frame)
    text_field(:email, :id=>"editProfileForm:email", :frame=>frame)
    radio_button(:upload_new_picture, :value=>"pictureUpload", :frame=>frame)
  end
end

Instance Method Details

#picture_file(filename, filepath = "") ⇒ Object



32
33
34
# File 'lib/kuali-sakai-common-lib/profile.rb', line 32

def picture_file(filename, filepath="")
  frm.file_field(:name=>"editProfileForm:uploadFile.uploadId").set(filepath + filename)
end

#saveObject



27
28
29
30
# File 'lib/kuali-sakai-common-lib/profile.rb', line 27

def save
  frm.button(:value=>"Save").click
  Profile.new(@browser)
end