Class: BasePage
- Inherits:
-
PageFactory
- Object
- PageFactory
- BasePage
show all
- Defined in:
- lib/sambal-cle/base_page.rb
Direct Known Subclasses
AddAnOption, AddBloggerComment, AddEditAnnouncements, AddEditAssessmentPart, AddEditMatrix, AddEditPages, AddEditPoll, AddEditPortfolioContent, AddEditPortfolioPage, AddEditSiteProperties, AddEditTerm, AddEditTools, AddEditTopic, AddForm, AddPeopleToShare, AddPortfolio, AddPortfolioTemplate, AddStyle, AddUpdateFeedback, Aliases, AliasesCreate, Announcements, AnnouncementsMerge, AnnouncementsOptions, AnnouncementsPermissions, AssessmentTotalScores, AssessmentsBase, AssignmentStudentView, AssignmentSubmission, AssignmentsBase, BasicLTI, BeginAssessment, Blogger, BlogsBase, BuildTemplate, CalendarBase, ChatRoom, ComposeForumMessage, ComposeMessage, ConfirmEvaluation, ConfirmPublishMatrix, ConfirmSiteSetup, CourseSiteInfo, CreateBloggerPost, CreateNewJob, CreateNewUser, CreateTrigger, EditAccount, EditAlias, EditCell, EditEvaluationAssignment, EditForum, EditHTMLPageContent, EditMatrixCells, EditPortfolio, EditProfile, EditSiteInfo, EditTemplate, EditTriggers, EditUser, EmailArchive, EmailArchiveOptions, EntityPicker, EvaluationSettings, EvaluationSystemBase, EventLog, Feedback, FolderDeleteConfirm, Forms, ForumTemplateSettings, ForumView, Forums, ForwardMessage, Glossary, GlossaryImport, GradeReport, Gradebook, Gradebook2, Home, ImportForms, ImportStepOne, ImportStepThree, ImportStepTwo, JForumsBase, JobList, JobScheduler, LessonsBase, Login, ManagePortfolioLayouts, ManageRooms, Matrices, MediaGallery, MessageDeleteConfirmation, MessageFolderSettings, MessageFolders, MessageView, Messages, MessagesNewFolder, MoveMessageTo, MyWorkspace, NewEvaluation, NewPage, NewTool, News, OrganizeForums, Podcasts, Polls, PortfolioConfigureToolOptions, PortfolioContent, PortfolioSiteInfo, PortfolioSiteTools, PortfolioTemplates, Portfolios, PortfoliosUploadFiles, PreviewBloggerPost, PreviewOverview, Profile, Profile2Base, PublishAssessment, PublishForm, Realms, RemoveSite, ReplyToMessage, ResourcesBase, Roster, RosterProfileView, RowColumnCommon, RunJobConfirmation, RwikiBase, Search, SearchAdmin, SearchPublic, SearchPublicResults, SectionsBase, SelectEvaluators, SelectMatrixStyle, SelectSchemaFile, SharePortfolio, SiteSaveAs, SiteSetupBase, SiteSetupChooseRole, SiteSummaryPage, Sites, Styles, SubmissionConfirmation, SupportingFilesPortfolio, SyllabusBase, TakeEvaluation, TopicPage, UserAccount, UserMembership, Users, ViewAnnouncement, ViewBloggerPost, ViewForumThread, ViewMembersBlog, ViewPM
Class Method Summary
collapse
Class Method Details
.basic_page_elements ⇒ Object
9
10
11
12
13
14
15
16
17
|
# File 'lib/sambal-cle/base_page.rb', line 9
def basic_page_elements
value(:alert_box) { |b| b.frm.div(:class=>"alertMessage").text }
value(:header) { |b| b.frm.div(:class=>"portletBody").h3.text }
button("Cancel")
button("Save")
button("Back")
end
|
24
25
26
27
|
# File 'lib/sambal-cle/base_page.rb', line 24
def button(button_text)
element(damballa(button_text+"_button")) { |b| b.frm.button(:value=>button_text) }
action(damballa(button_text)) { |b| b.frm.button(:value=>button_text).click }
end
|
.damballa(text) ⇒ Object
29
30
31
32
33
34
|
# File 'lib/sambal-cle/base_page.rb', line 29
def damballa(text)
text.gsub(/([+=|\\\.~@#'"\?`!\{\}\[\]\$%\^&\*\(\)])/, "").
gsub(/([-\/\ ])/,"_").
downcase.
to_sym
end
|
.frame_element ⇒ Object
5
6
7
|
# File 'lib/sambal-cle/base_page.rb', line 5
def frame_element
element(:frm) { |b| b.frame(:class=>"portletMainIframe") }
end
|
.link(link_text) ⇒ Object
19
20
21
22
|
# File 'lib/sambal-cle/base_page.rb', line 19
def link(link_text)
element(damballa(link_text+"_link")) { |b| b.frm.link(:text=>link_text) }
action(damballa(link_text)) { |b| b.frm.link(:text=>link_text).click }
end
|