Module: DisneyDetail

Included in:
DestinationServicesGUI::Detail
Defined in:
lib/page_objects/modules/disney_detail.rb

Instance Method Summary collapse

Instance Method Details

#get_hot_modality_priceObject



5
6
7
8
9
10
11
12
# File 'lib/page_objects/modules/disney_detail.rb', line 5

def get_hot_modality_price

  tickets_table = browser.lis(:class, 'ux-destination-services-detail-table-row')
  hot_modality_price = tickets_table[1].li(:class, 'ux-destination-services-detail-table-price').text.split[1]

  hot_modality_price

end

#get_multiple_day_ticket_price(li = 0) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/page_objects/modules/disney_detail.rb', line 14

def get_multiple_day_ticket_price(li = 0)

  tickets_table = browser.lis(:class, 'ux-destination-services-detail-table-row')

  browser.input(:class, 'ux-destination-services-detail-table-days-input').click

  browser.ul(:class, 'ux-destination-services-detail-table-days-list').lis[li].click

  multiple_day_price = tickets_table[2].li(:class, 'ux-destination-services-detail-table-price').text.split[1]

  multiple_day_price

end

#get_one_day_ticket_price(input = 0) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/page_objects/modules/disney_detail.rb', line 38

def get_one_day_ticket_price(input = 0)

  tickets_table = browser.lis(:class, 'ux-destination-services-detail-table-row')

  browser.ul(:class, 'ux-destination-services-detail-table-parks').inputs[input].click

  one_day_price = tickets_table[3].li(:class, 'ux-destination-services-detail-table-price').text.split[1]

  one_day_price

end

#get_random_multiple_day_ticket_priceObject



28
29
30
31
32
33
34
35
36
# File 'lib/page_objects/modules/disney_detail.rb', line 28

def get_random_multiple_day_ticket_price

  li = [0,1,3,4,5,6,7]

  li = li.shuffle.pop

  get_multiple_day_ticket_price(li)

end

#get_random_one_day_ticket_priceObject



50
51
52
53
54
55
56
# File 'lib/page_objects/modules/disney_detail.rb', line 50

def get_random_one_day_ticket_price

  input = [0,1].shuffle.pop

  get_one_day_ticket_price(input)

end