Class: ImportStepThree
- Defined in:
- lib/sambal-cle/page_objects/calendar.rb
Instance Method Summary collapse
-
#event_date(event_name) ⇒ Object
Returns the date of the specified event.
-
#events ⇒ Object
Returns an array containing the list of Activity names on the page.
-
#uncheck_event(event_name) ⇒ Object
Unchecks the checkbox for the specified event.
Methods inherited from BasePage
basic_page_elements, frame_element
Instance Method Details
#event_date(event_name) ⇒ Object
Returns the date of the specified event
316 317 318 |
# File 'lib/sambal-cle/page_objects/calendar.rb', line 316 def event_date(event_name) frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(event_name)}/)[0].text end |
#events ⇒ Object
Returns an array containing the list of Activity names on the page.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/sambal-cle/page_objects/calendar.rb', line 299 def events list = [] frm.table(:class=>/listHier lines/).rows.each do |row| if row.label(:for=>/eventSelected/).exist? list << row.label.text end end names = [] list.uniq! list.each do | item | name = item[/(?<=\s).+(?=\s\s\()/] names << name end names end |
#uncheck_event(event_name) ⇒ Object
Unchecks the checkbox for the specified event
321 322 323 |
# File 'lib/sambal-cle/page_objects/calendar.rb', line 321 def uncheck_event(event_name) frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(event_name)}/) end |