def test_363(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ActivityHubPage()
     page.open()
     InactiveActivity = 'Sometimes inactive activity'
     page.search_activity_field.send_keys(InactiveActivity)
     page.show_inactive.click()
     time.sleep(5)
     page.activity_actions.click()
     page.edit_activity.click()
     page = AddEditActivityPage()
     time.sleep(10)
     select = Select(page.activity_status)
     NewActivityStatus = "Inactive"
     select.select_by_visible_text(NewActivityStatus )
     page.save_button.click()
     page = NavigationBar()
     time.sleep(8)
     page.main_actions_drop_down.click()
     page.add_a_booking.click()
     time.sleep(8)
     page = AdminBookingPage()
     page.activity_list.click()
     L=[]
     for i in range(0, len(page.activities_in_list)):
         L.append(page.activities_in_list[i].get_attribute("textContent"))
     assert InactiveActivity not in L
 def test_214(self):
     page = ChannelPage()
     page.open()
     time.sleep(5)
     page.search_field.send_keys(ChannelNameList[0])
     time.sleep(2)
     page.table_channel_editbutton.click()
     time.sleep(5)
     assert page.status_checkbox.is_selected() == True
     page.status_checkbox.click()
     page.save_button.click()
     time.sleep(7)
     page = NavigationBar()
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(ActivityName)
     page.first_tickets_type.send_keys('1')
     time.sleep(5)
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate = str(random.randint(2, 30))
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours = str(random.randint(2, 10))
     minutes_values = ('00', '15', '30', '45')
     EventTimeMinutes = random.choice(minutes_values)
     timeday = random.choice(('AM', 'PM'))
     EventTimeWithZone = (EventTimeHours + ':' + ''.join(EventTimeMinutes) +
                          ' ' + ''.join(timeday) + ' ' +
                          ''.join(ActivityTimezone))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone)
     time.sleep(5)
     page.enter_customer_information_button.click()
     FirstName = "Alexey"
     page.first_name.send_keys(FirstName)
     LastName = "Kolennikov"
     page.last_name.send_keys(LastName)
     EmailAddress = '*****@*****.**'
     page.email_address.send_keys(EmailAddress)
     page.complete_booking_button.click()
     time.sleep(2)
     select = Select(page.channel_list)
     time.sleep(5)
     L = []
     for i in range(0, len(page.channel_list_options)):
         L.append(page.channel_list_options[i].get_attribute("textContent"))
     assert ChannelNameList[0] not in L
 def test_977(self):
     page = EventCalendarPage()  # STEP1
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     time.sleep(5)
     page.hide_events.click()
     time.sleep(5)
     page.event_tickets[0].click()
     time.sleep(5)
     for i in range(0, len(page.event_tickets)):
         if EventHeaderDateTimeList[
                 0] != page.date_time_title.get_attribute('textContent'):
             page.close_button.click()
             time.sleep(5)
             page.event_tickets[i + 1].click()
             time.sleep(5)
             continue
         else:
             time.sleep(5)
             assert 'Ticket Sold: 0' not in page.manifest_title.get_attribute(
                 "innerText")
             assert 'Ticket Sold: 1' not in page.manifest_title.get_attribute(
                 "innerText")
             assert 'Tickets Sold: 2' not in page.manifest_title.get_attribute(
                 "innerText")
             page.add_booking_button.click()  # STEP2
         break
     time.sleep(5)
     page = AdminBookingPage()
     time.sleep(5)
     page.first_tickets_type.send_keys('1')  # STEP3
     time.sleep(5)
     page.enter_customer_information_button.click()  # STEP4
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  # STEP5
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()  # STEP6
     time.sleep(5)
     wait = WebDriverWait(get_driver(), 15)
     wait.until(lambda driver: page.is_element_present('payment_type_list'))
     select = Select(page.payment_type_list)  # STEP7
     PaymentType = "Cash"
     select.select_by_visible_text(PaymentType)
     page.submit_booking_button.click()  # STEP8
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent") == 'Booking Successful!'
     page.final_alert_ok_button.click()  # STEP9
 def test_983(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ActivityHubPage()
     page.open()
     time.sleep(5)
     page.search_activity_field.send_keys(ActivityName)
     time.sleep(5)
     page.activity_actions.click()
     page.edit_activity.click()
     page = AddEditActivityPage()
     time.sleep(15)
     select = Select(page.first_guide)
     if page.switcher_minimum_enforce.get_attribute(
             "outerHTML"
     ) != switcher_OFF and page.ticket_minimum.get_attribute(
             'value'
     ) == '5' and select.first_selected_option.text == GuideName and page.switchers2[
             0].get_attribute(
                 "outerHTML") == switcher_OFF:  #First Sale Closes Event::
         page.cancel_button.click()
     else:
         if page.switcher_minimum_enforce.get_attribute(
                 "outerHTML") == switcher_OFF:
             page.switcher_minimum_enforce.click()
             time.sleep(2)
             assert page.switcher_minimum_enforce.get_attribute(
                 "outerHTML") != switcher_OFF  # Tickets Minimum Enforce
         if page.ticket_minimum.get_attribute('value') != '5':
             page.ticket_minimum.clear()
             page.ticket_minimum.send_keys('5')
         if select.first_selected_option.text != GuideName:
             select.select_by_visible_text(GuideName)
         if page.switchers2[0].get_attribute("outerHTML") != switcher_OFF:
             page.switchers2[0].click()
             time.sleep(2)
             assert page.switchers2[0].get_attribute(
                 "outerHTML") == switcher_OFF  #First Sale Closes Event:
         page.save_button.click()
     page = EventCalendarPage()
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     time.sleep(5)
     page.hide_events.click()
     time.sleep(5)
     page.event_tickets[0].click()
     time.sleep(5)
     for i in range(0, len(page.event_tickets)):
         if 'Ticket Sold: 0' not in page.manifest_title.get_attribute(
                 "innerText"):
             page.close_button.click()
             time.sleep(5)
             page.event_tickets[i + 1].click()
             time.sleep(5)
             continue
         else:
             time.sleep(5)
             EventHeaderDateTimeList.append(
                 page.date_time_title.get_attribute('textContent'))
             page.add_booking_button.click()
         break
     time.sleep(5)
     page = AdminBookingPage()
     time.sleep(5)
     TimeList.append(page.time_current_booking.get_attribute('textContent'))
     DateList.append(page.date_current_booking.get_attribute('textContent'))
     page.first_tickets_type.send_keys('5')
     time.sleep(5)
     page.enter_customer_information_button.click()
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()
     time.sleep(5)
     wait = WebDriverWait(get_driver(), 15)
     wait.until(lambda driver: page.is_element_present('payment_type_list'))
     select = Select(page.payment_type_list)
     PaymentType = "Cash"
     select.select_by_visible_text(PaymentType)
     page.cash_recieved.click()
     time.sleep(5)
     page.submit_booking_button.click()
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent") == 'Booking Successful!'
     page.final_alert_ok_button.click()
     page = EventCalendarPage()
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     time.sleep(5)
     page.hide_events.click()
     time.sleep(5)
     page.event_tickets[0].click()
     time.sleep(5)
     for i in range(0, len(page.event_tickets)):
         if EventHeaderDateTimeList[
                 0] != page.date_time_title.get_attribute('textContent'):
             page.close_button.click()
             time.sleep(5)
             page.event_tickets[i + 1].click()
             time.sleep(5)
             continue
         else:
             time.sleep(5)
             assert 'Tickets Sold: 5' in page.manifest_title.get_attribute(
                 "innerText")
             assert page.event_status.get_attribute(
                 'textContent') == 'Pending'
         break
     time.sleep(5)
     select = Select(page.guide_list)
     select.select_by_visible_text(GuideName)
     page.save_guide.click()
     assert page.info_pop_up.get_attribute(
         'textContent') == "Information was saved successfully."
     page.OK_info_pop_up.click()
     page = loginpage()
     page.open()
     page.login_field.send_keys(guide_flat_login)
     page.password_field.send_keys(guide_flat_password)
     page.button.click()
     page = GuidePage()
     time.sleep(5)
     page.search_field.send_keys(ActivityName)  #STEP1
     time.sleep(5)
     EventDate = DateList[0].partition(' ')[2]
     for i in range(0, len(page.event_tickets)):  # STEP7
         page.event_tickets[i].click()
         time.sleep(10)
         if EventDate in page.date_time_title.get_attribute('textContent'):
             if TimeList[0] in page.date_time_title.get_attribute(
                     'textContent'):
                 break
             else:
                 get_driver().back()
                 time.sleep(5)
                 i += 1
                 continue
         else:
             get_driver().back()
             time.sleep(5)
             i += 1
             continue
     assert '(5)' in page.customer_tickets.get_attribute("innerText")
     time.sleep(5)
     page.add_booking.click()  #STEP2
     page = AdminBookingPage()
     page.first_tickets_type.send_keys('1')  #STEP3
     time.sleep(5)
     page.enter_customer_information_button.click()  # STEP4
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  # STEP5
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()  # STEP6
     time.sleep(5)
     wait = WebDriverWait(get_driver(), 15)
     wait.until(lambda driver: page.is_element_present('payment_type_list'))
     select = Select(page.payment_type_list)  # STEP7
     PaymentType = "Credit Card"
     select.select_by_visible_text(PaymentType)
     select = Select(page.credit_card_list)
     time.sleep(5)
     select.select_by_visible_text('New Card')
     time.sleep(5)
     get_driver().switch_to.frame(page.stripe)
     page.card_number_input.send_keys(CC_Number)
     page.card_date_input.send_keys(ExpDate)
     page.card_cvc_input.send_keys(CVC)
     page.card_zip_input.send_keys(CCZip)
     get_driver().switch_to.default_content()
     page.submit_booking_button.click()  # STEP8
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent") == 'Booking Successful!'
     page.final_alert_ok_button.click()  # STEP9
 def test_891(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = NavigationBar()
     time.sleep(2)
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()  #STEP1
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(ActivityName)  #STEP2
     page.first_tickets_type.send_keys(AdultTickets)  #STEP3
     time.sleep(5)
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate = str(random.randint(2, 27))  #STEP4
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours = str(random.randint(2, 11))
     minutes_values = ('00', '15', '30', '45')
     EventTimeMinutes = random.choice(minutes_values)
     timeday = random.choice(('AM', 'PM'))
     EventTimeWithZone = (EventTimeHours + ':' + ''.join(EventTimeMinutes) +
                          ' ' + ''.join(timeday) + ' ' +
                          ''.join(ActivityTimezone))
     NextMonthName = (datetime.now() +
                      relativedelta(months=1)).strftime("%B")
     NewFullDate = (NextMonthName + ' ' + ''.join(str(EventDate)))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone)  #STEP5
     time.sleep(5)
     page.enter_customer_information_button.click()  #STEP6
     first_names = ('Ivan-John', 'Peter-Paul', 'John-Alex', 'Bill-Michael',
                    'Michael-James', 'Sidor-Bob', 'Alex-Ivan', 'James-Tim',
                    'Bob-Chris', 'Ivan-Jim', 'Tim-Michael', 'Chris-Jim',
                    'Jim-John', 'Pahom-Sidor', 'Vlad-Vadim', 'Paul-James')
     NewFirstName = random.choice(first_names)
     page.first_name.send_keys(NewFirstName)  #STEP7
     last_names = ('Smith', 'Baker', 'Petroff', 'Smirnoff', 'Black',
                   'White', 'Broun', 'Ivanoff', 'Green', 'Clinton',
                   'Jameson', 'Last', 'Sergeff', 'Madison')
     NewLastName = random.choice(last_names)
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewPhone = (''.join(choice(digits) for i in range(15)))
     page.phone_number.send_keys(NewPhone)
     page.complete_booking_button.click()
     time.sleep(7)
     select = Select(page.payment_type_list)
     PaymentType = "Cash"  # STEP8
     select.select_by_visible_text(PaymentType)
     page.cash_recieved.click()
     page.submit_booking_button.click()
     time.sleep(5)
     page = EventCalendarPage()  #STEP10
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     page.date_picker.click()
     time.sleep(2)
     page.date_picker_next.click()
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute("textContent") == str(
                 EventDate):
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     EventTime = (EventTimeHours + ':' + ''.join(EventTimeMinutes) + ' ' +
                  ''.join(timeday))
     assert str(NewFullDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:  #STEP11
         for i in range(0, len(page.day_slots)):
             if EventTime in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
             else:
                 continue
         break
     time.sleep(6)
     assert page.customer_name_link.get_attribute(
         'textContent') == NewFullName
     assert page.phone_link.get_attribute('pathname') == NewPhone
     page.customer_name_link.click()  # STEP12
     page = CustomerListPage()
     assert page.customer_name_info.get_attribute(
         'textContent') == NewFullName + "'s"
     assert page.phone_info.get_attribute('innerText') == NewPhone
     assert page.email_info.get_attribute('innerText') == 'Not Saved'
     assert page.zip_info.get_attribute('innerText') == 'Not Saved'
     assert page.state_info.get_attribute('innerText') == 'Not Saved'
     assert page.address_info.get_attribute('innerText') == 'Not Saved'
     assert page.timeline_tickets_title.get_attribute(
         'textContent'
     ) == 'Purchased Tickets for the ' + ''.join(ActivityName)
     assert EventTimeWithZone and NewFullDate in page.timeline_event.get_attribute(
         'textContent')
     assert page.timeline_tickets.get_attribute(
         'textContent'
     ) == AdultTickets + ' Tickets | ' + ''.join(AdultTicketPrice) + ' '
     page.activities_tab_link.click()
     time.sleep(5)
     assert page.activities_tab_title.get_attribute(
         'innerText') == ActivityName
     assert page.activities_tickets.get_attribute(
         'innerText'
     ) == AdultTickets + ' tickets | ' + ''.join(AdultTicketPrice)
     cnxn = pyodbc.connect(
         'DRIVER={ODBC Driver 17 for SQL Server};SERVER=' + server +
         ';DATABASE=' + database + ';UID=' + username + ';PWD=' +
         password)  #STEP 14
     cursor = cnxn.cursor()
     cursor.execute(
         "SELECT TOP 1 * FROM customer ORDER BY customer_id DESC")
     row = cursor.fetchone()
     CustomerID = row[0]
     assert row[1] == 68  #company ID
     assert row[2] == NewFirstName
     assert row[3] == NewLastName
     assert row[4] == None  #customer_address_1
     assert row[5] == None  #customer_address_2
     assert row[6] == None  #customer_city
     assert row[7] == None  #customer_state
     assert row[8] == None  #customer_zipcode
     assert row[9] == None  #customer_country
     assert row[10] == NewPhone  #customer_phone_1
     assert row[11] == None  #customer_phone_2
     assert row[12] == None
     assert row[17] == NewPhone  #CustomerKey
     page = NavigationBar()
     time.sleep(2)
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()  # STEP15
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(ActivityName2)  # STEP16
     page.first_tickets_type.send_keys(AdultTickets)  # STEP17
     time.sleep(5)
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate2 = str(int(EventDate) + 1)  # STEP18
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate2:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours2 = str(random.randint(2, 11))
     minutes_values = ('00', '15', '30', '45')
     EventTimeMinutes2 = random.choice(minutes_values)
     timeday2 = random.choice(('AM', 'PM'))
     EventTimeWithZone2 = (EventTimeHours2 + ':' +
                           ''.join(EventTimeMinutes2) + ' ' +
                           ''.join(timeday2) + ' ' +
                           ''.join(ActivityTimezone2))
     NextMonthName = (datetime.now() +
                      relativedelta(months=1)).strftime("%B")
     NewFullDate2 = (NextMonthName + ' ' + ''.join(str(EventDate2)))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone2)  # STEP19
     time.sleep(5)
     page.enter_customer_information_button.click()  # STEP20
     page.first_name.send_keys(NewFirstName)  # STEP21
     page.last_name.send_keys(NewLastName)
     page.phone_number.send_keys(NewPhone)
     NewEmail = (''.join(choice(digits)
                         for i in range(15)) + '@mailinator.com')
     page.email_address.send_keys(NewEmail)
     page.complete_booking_button.click()
     time.sleep(7)
     select = Select(page.payment_type_list)
     PaymentType = "Credit Card"  # STEP22
     select.select_by_visible_text(PaymentType)
     select = Select(page.credit_card_list)
     time.sleep(5)
     select.select_by_visible_text('New Card')
     time.sleep(5)
     get_driver().switch_to.frame(page.stripe)
     page.card_number_input.send_keys(CC_Number)
     page.card_date_input.send_keys(ExpDate)
     page.card_cvc_input.send_keys(CVC)
     page.card_zip_input.send_keys(CCZip)
     get_driver().switch_to.default_content()
     page.submit_booking_button.click()
     time.sleep(5)
     page = EventCalendarPage()  # STEP24
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName2)
     page.date_picker.click()
     time.sleep(2)
     page.date_picker_next.click()
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute("textContent") == str(
                 EventDate2):
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     EventTime2 = (EventTimeHours2 + ':' + ''.join(EventTimeMinutes2) +
                   ' ' + ''.join(timeday2))
     assert str(NewFullDate2) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:  # STEP25
         for i in range(0, len(page.day_slots)):
             if EventTime2 in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
             else:
                 continue
         break
     time.sleep(6)
     assert page.customer_name_link.get_attribute(
         'textContent') == NewFullName
     assert page.phone_link.get_attribute('pathname') == NewPhone
     assert page.email_link.get_attribute('textContent') == NewEmail
     page.close_button.click()
     select = Select(page.activity_name)  # STEP26
     select.select_by_visible_text(ActivityName)
     page.date_picker.click()
     time.sleep(2)
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute("textContent") == str(
                 EventDate):
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     EventTime = (EventTimeHours + ':' + ''.join(EventTimeMinutes) + ' ' +
                  ''.join(timeday))
     assert str(NewFullDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:
         for i in range(0, len(page.day_slots)):
             if EventTime in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
             else:
                 continue
         break
     time.sleep(6)
     assert page.customer_name_link.get_attribute(
         'textContent') == NewFullName
     assert page.phone_link.get_attribute('pathname') == NewPhone
     page.customer_name_link.click()  # STEP27
     page = CustomerListPage()
     assert page.customer_name_info.get_attribute(
         'textContent') == NewFullName + "'s"
     assert page.phone_info.get_attribute('innerText') == NewPhone
     assert page.email_info.get_attribute('innerText') == NewEmail
     assert page.zip_info.get_attribute('innerText') == 'Not Saved'
     assert page.state_info.get_attribute('innerText') == 'Not Saved'
     assert page.address_info.get_attribute('innerText') == 'Not Saved'
     assert page.timeline_email_title.get_attribute(
         'textContent'
     ) == 'Purchased Tickets for the ' + ''.join(ActivityName2)
     assert EventTimeWithZone2 and NewFullDate2 in page.timeline_event.get_attribute(
         'textContent')
     assert page.timeline_tickets.get_attribute(
         'textContent'
     ) == AdultTickets + ' Tickets | ' + ''.join(AdultTicketPrice2) + ' '
     page.activities_tab_link.click()
     time.sleep(5)
     assert page.activities_tab_title.get_attribute(
         'innerText') == ActivityName2
     assert page.activities_tickets.get_attribute(
         'innerText'
     ) == AdultTickets + ' tickets | ' + ''.join(AdultTicketPrice2)
     page = CustomerListPage()  # STEP29
     page.open()
     page.search_field.send_keys(NewPhone)
     page.search_button.click()
     time.sleep(2)
     assert page.customer_name_in_list.get_attribute(
         'textContent') == NewFullName
     assert page.phone_in_list.get_attribute('textContent') == NewPhone
     assert page.activity_name_in_list.get_attribute(
         'textContent') == ActivityName2
     assert page.is_element_present('customer_name_in_list2') == False
     cursor.execute(
         "SELECT TOP 1 * FROM customer ORDER BY customer_id DESC")  #STEP30
     row = cursor.fetchone()
     assert row[0] == CustomerID
     assert row[1] == 68  # company ID
     assert row[2] == NewFirstName
     assert row[3] == NewLastName
     assert row[4] == None  #customer_address_1
     assert row[5] == None  #customer_address_2
     assert row[6] == None  #customer_city
     assert row[7] == None  #customer_state
     assert row[8] == None  #customer_zipcode
     assert row[9] == None  #customer_country
     assert row[10] == NewPhone  #customer_phone_1
     assert row[11] == None  #customer_phone_2
     assert row[12] == NewEmail
     assert row[17] == NewEmail  #CustomerKey
 def test_8(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ChannelPayrollPage()
     page.open()
     page.channel_payment_due.click()
     time.sleep(3)
     try:
         for i in range(0, len(page.channel_entries)):
             if channel in page.channel_entries[i].get_attribute(
                     'textContent'):
                 page.channel_detail[i].click()
             else:
                 continue
             break
         time.sleep(3)
         for i in range(0, len(page.cash)):
             if page.cash[i].is_displayed():
                 page.cash[i].click()
             else:
                 continue
             break
         time.sleep(6)
         for i in range(0, len(page.pay_button)):
             if page.pay_button[i].is_displayed():
                 page.pay_button[i].click()
             else:
                 continue
             break
         time.sleep(6)
         alert = get_driver().switch_to_alert()
         alert.accept()
         time.sleep(2)
         page.OK_button.click()
         time.sleep(2)
     except WebDriverException:
         print("Channel has no payment due")
     page = NavigationBar()
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(ActivityName)
     page.first_tickets_type.send_keys(AdultTickets)
     time.sleep(5)
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate = str(random.randint(2, 30))
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours = str(random.randint(2, 11))
     minutes_values = ('00', '15', '30', '45')
     EventTimeMinutes = random.choice(minutes_values)
     timeday = random.choice(('AM', 'PM'))
     EventTimeWithZone = (EventTimeHours + ':' + ''.join(EventTimeMinutes) +
                          ' ' + ''.join(timeday) + ' ' +
                          ''.join(ActivityTimezone))
     nextMonthDate = (datetime.now() +
                      relativedelta(months=1)).strftime('%#m')
     NextMonthName = (datetime.now() +
                      relativedelta(months=1)).strftime("%B")
     NewFullDate = (NextMonthName + ' ' + ''.join(str(EventDate)))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone)
     time.sleep(5)
     page.enter_customer_information_button.click()
     FirstName = "Alexey"
     page.first_name.send_keys(FirstName)
     LastName = "Kolennikov"
     page.last_name.send_keys(LastName)
     EmailAddress = '*****@*****.**'
     page.email_address.send_keys(EmailAddress)
     page.complete_booking_button.click()
     time.sleep(2)
     select = Select(page.channel_list)
     time.sleep(5)
     select.select_by_visible_text(channel)
     select = Select(page.payment_type_list)
     time.sleep(5)
     PaymentType = "Cash"
     select.select_by_visible_text(PaymentType)
     time.sleep(2)
     page.cash_recieved.click()
     page.submit_booking_button.click()
     time.sleep(5)
     page = EventCalendarPage()
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     page.date_picker.click()
     time.sleep(2)
     page.date_picker_next.click()
     time.sleep(2)
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute("textContent") == str(
                 EventDate):
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     EventTime = (EventTimeHours + ':' + ''.join(EventTimeMinutes) + ' ' +
                  ''.join(timeday))
     assert str(NewFullDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:
         for i in range(0, len(page.day_slots)):
             if EventTime in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
                 time.sleep(6)
                 assert NewFullDate and EventTime in page.date_time_title.get_attribute(
                     'textContent')
                 assert ActivityName == page.activity_name_title.get_attribute(
                     'textContent')
                 select = Select(page.guide_list)
                 select.select_by_visible_text(GuideName)
                 page.save_guide.click()
                 page.close_button.click()
             else:
                 continue
         break
     page = loginpage()
     page.open()
     page.login_field.send_keys(guide_login)
     page.password_field.send_keys(guide_password)
     page.button.click()
     page = GuidePage()
     time.sleep(2)
     page.day_button.click()
     time.sleep(2)
     page.date_picker.click()
     time.sleep(2)
     page.next_month.click()
     time.sleep(2)
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute("textContent") == str(
                 EventDate):
             page.days_date_picker[i].click()
         else:
             continue
         break
     time.sleep(2)
     assert str(NewFullDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:
         for i in range(0, len(page.day_slots)):
             if EventTime in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
                 time.sleep(6)
                 assert NextMonthName and EventDate and EventTimeWithZone in page.date_time_title.get_attribute(
                     'textContent')
                 assert ActivityName in page.activity_name_title.get_attribute(
                     'textContent')
             else:
                 continue
         break
     time.sleep(4)
     page.check_in.click()
     page.event_complete.click()
     alert = get_driver().switch_to_alert()
     alert.accept()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ChannelPayrollPage()
     page.open()
     page.channel_payment_due.click()
     time.sleep(5)
     L = []
     for i in range(0, len(page.channel_entries)):
         if channel in page.channel_entries[i].get_attribute('textContent'):
             assert comission_amount in page.channel_entries[
                 i].get_attribute('textContent')
             L.append(page.channel_entries[i].get_attribute('textContent'))
         else:
             continue
         break
     assert len(L) == 1
 def test_880(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = NavigationBar()
     time.sleep(2)
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()  #STEP1
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(ActivityName)  #STEP2
     page.first_tickets_type.send_keys(AdultTickets)  #STEP3
     time.sleep(5)
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate = str(random.randint(2, 28))  #STEP4
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours = str(random.randint(2, 11))
     minutes_values = ('00', '15', '30', '45')
     EventTimeMinutes = random.choice(minutes_values)
     timeday = random.choice(('AM', 'PM'))
     EventTimeWithZone = (EventTimeHours + ':' + ''.join(EventTimeMinutes) +
                          ' ' + ''.join(timeday) + ' ' +
                          ''.join(ActivityTimezone))
     nextMonthDate = (datetime.now() +
                      relativedelta(months=1)).strftime('%#m')
     NextMonthName = (datetime.now() +
                      relativedelta(months=1)).strftime("%B")
     NewFullDate = (NextMonthName + ' ' + ''.join(str(EventDate)))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone)  #STEP5
     time.sleep(5)
     page.enter_customer_information_button.click()  #STEP6
     first_names = ('Ivan', 'Peter', 'John', 'Bill', 'Michael', 'Sidor',
                    'Alex', 'James', 'Bob', 'Ivan', 'Tim', 'Chris', 'Jim',
                    'Pahom', 'Vlad', 'Paul')
     NewFirstName = random.choice(first_names)
     page.first_name.send_keys(NewFirstName)  #STEP7
     last_names = ('Smith', 'Baker', 'Petroff', 'Smirnoff', 'Black',
                   'White', 'Broun', 'Ivanoff', 'Green', 'Clinton',
                   'Jameson', 'Last', 'Sergeff', 'Madison')
     NewLastName = random.choice(last_names)
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     page.complete_booking_button.click()
     time.sleep(7)
     select = Select(page.payment_type_list)
     PaymentType = "Cash"  #STEP8
     select.select_by_visible_text(PaymentType)
     page.cash_recieved.click()
     page.submit_booking_button.click()
     time.sleep(5)
     page = EventCalendarPage()  #STEP10
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     page.date_picker.click()
     time.sleep(2)
     page.date_picker_next.click()
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute("textContent") == str(
                 EventDate):
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     EventTime = (EventTimeHours + ':' + ''.join(EventTimeMinutes) + ' ' +
                  ''.join(timeday))
     assert str(NewFullDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:  #STEP11
         for i in range(0, len(page.day_slots)):
             if EventTime in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
             else:
                 continue
         break
     time.sleep(6)
     assert page.customer_name_link.get_attribute(
         'textContent') == NewFullName
     page.customer_name_link.click()  # STEP12
     page = CustomerListPage()
     assert page.customer_name_info.get_attribute(
         'textContent') == NewFullName + "'s"
     #assert page.phone_info.get_attribute('innerText')=='Not Saved' #BUG 2954
     assert page.email_info.get_attribute('innerText') == 'Not Saved'
     assert page.zip_info.get_attribute('innerText') == 'Not Saved'
     assert page.state_info.get_attribute('innerText') == 'Not Saved'
     assert page.address_info.get_attribute('innerText') == 'Not Saved'
     assert page.timeline_tickets_title.get_attribute(
         'textContent'
     ) == 'Purchased Tickets for the ' + ''.join(ActivityName)
     assert EventTimeWithZone and NewFullDate in page.timeline_event.get_attribute(
         'textContent')
     assert page.timeline_tickets.get_attribute(
         'textContent'
     ) == AdultTickets + ' Tickets | ' + ''.join(AdultTicketPrice) + ' '
     page.activities_tab_link.click()
     time.sleep(5)
     assert page.activities_tab_title.get_attribute(
         'innerText') == ActivityName
     assert page.activities_tickets.get_attribute(
         'innerText'
     ) == AdultTickets + ' tickets | ' + ''.join(AdultTicketPrice)
     cnxn = pyodbc.connect(
         'DRIVER={ODBC Driver 17 for SQL Server};SERVER=' + server +
         ';DATABASE=' + database + ';UID=' + username + ';PWD=' +
         password)  #STEP 14
     cursor = cnxn.cursor()
     cursor.execute(
         "SELECT TOP 1 * FROM customer ORDER BY customer_id DESC")
     row = cursor.fetchone()
     assert row[1] == 68  #company ID
     assert row[2] == NewFirstName
     assert row[3] == NewLastName
     assert row[17] == None  #CustomerKey
Exemplo n.º 8
0
 def test_567(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ActivityHubPage()
     page.open()
     time.sleep(5)
     page.search_activity_field.send_keys(ActivityName)
     time.sleep(5)
     page.activity_actions.click()
     page.edit_activity.click()
     page = AddEditActivityPage()
     time.sleep(15)
     if page.sales_tax.get_attribute("value") == '0 %':
         page.cancel_button.click()
     else:
         page.sales_tax.clear()
         page.sales_tax.send_keys('0')
     page = NavigationBar()
     time.sleep(2)
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()  # STEP1
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(ActivityName)  # STEP2
     page.first_tickets_type.send_keys('1')  # STEP3
     page.second_tickets_type.send_keys('1')
     time.sleep(5)
     assert page.ticket_total.get_attribute("innerText") == '$150.00'
     assert page.discount.get_attribute("innerText") == '- $0.00'
     assert page.giftcertificate.get_attribute("innerText") == '- $0.00'
     assert page.taxes.get_attribute("innerText") == '$0.00'
     assert page.booking_fee.get_attribute("innerText") == '$0.00'
     assert page.grand_total.get_attribute("innerText") == '$150.00'
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate = str(random.randint(2, 27))  # STEP4
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours = str(random.randint(8, 11))
     minutes_values = '00'
     EventTimeMinutes = minutes_values
     timeday = 'AM'
     EventTimeWithZone = (EventTimeHours + ':' + ''.join(EventTimeMinutes) +
                          ' ' + ''.join(timeday) + ' ' +
                          ''.join(ActivityTimezone))
     NextMonthName = (datetime.now() +
                      relativedelta(months=1)).strftime("%B")
     NewFullDate = (NextMonthName + ' ' + ''.join(str(EventDate)))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone)  # STEP5
     time.sleep(5)
     page.enter_customer_information_button.click()  # STEP6
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  # STEP5
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()
     time.sleep(7)
     select = Select(page.payment_type_list)
     PaymentType = "Credit Card"  # STEP8
     select.select_by_visible_text(PaymentType)
     select = Select(page.credit_card_list)
     time.sleep(5)
     select.select_by_visible_text('New Card')
     time.sleep(5)
     get_driver().switch_to.frame(page.stripe)
     page.card_number_input.send_keys(CC_Number)
     page.card_date_input.send_keys(ExpDate)
     page.card_cvc_input.send_keys(CVC)
     page.card_zip_input.send_keys(CCZip)
     get_driver().switch_to.default_content()
     page.submit_booking_button.click()
     time.sleep(5)
     page = EventCalendarPage()  # STEP10
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     page.date_picker.click()
     time.sleep(2)
     page.date_picker_next.click()
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute("textContent") == str(
                 EventDate):
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     EventTime = (EventTimeHours + ':' + ''.join(EventTimeMinutes) + ' ' +
                  ''.join(timeday))
     assert str(NewFullDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:  # STEP11
         for i in range(0, len(page.day_slots)):
             if EventTime in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
             else:
                 continue
         break
     time.sleep(6)
     assert page.customer_name_link.get_attribute(
         'textContent') == NewFullName
     assert page.email_link.get_attribute('innerText') == NewEmail
     assert '1 Adult' in page.manifest_tickets.get_attribute("innerText")
     assert '1 Child' in page.manifest_tickets.get_attribute("innerText")
     assert page.paid_link.get_attribute(
         "innerText") == 'Paid in Full : $150.00 '
     page.paid_link.click()  #STEP12
     page = CustomerChargePage()
     time.sleep(5)
     assert page.ticket_total.get_attribute('textContent') == '$150.00'
     assert page.boooking_fee.get_attribute('textContent') == '$0.00'
     assert page.taxes.get_attribute('textContent') == '$0.00'
     assert page.grand_total.get_attribute('textContent') == '$150.00'
     assert page.total_charges.get_attribute('textContent') == '$150.00'
     assert page.total_due.get_attribute('textContent') == '$0.00'
     cnxn = pyodbc.connect(
         'DRIVER={ODBC Driver 17 for SQL Server};SERVER=' + server +
         ';DATABASE=' + database + ';UID=' + username + ';PWD=' +
         password)  # STEP 13
     cursor = cnxn.cursor()
     cursor.execute("SELECT TOP 1 * FROM charge ORDER BY charge_id DESC")
     row = cursor.fetchone()
     assert row[12] == 0  # charge_amount_tax
     assert row[13] == 150  # charge_amount_total
     assert row[9] == 'creditcard'  # charge_type
     assert 'OK|CHARGED|' in row[14]  #charge_resulttext
     cursor.execute(
         "SELECT TOP 1 * FROM q_charge_ex ORDER BY charge_id DESC"
     )  # STEP14
     row = cursor.fetchone()
     assert row[12] == 0  # charge_amount_tax
     assert row[13] == 150  # charge_amount_total
     assert row[9] == 'creditcard'  # charge_type
     assert 'OK|CHARGED|' in row[14]  #charge_resulttext
Exemplo n.º 9
0
 def test_327(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ChannelPage()
     page.open()
     page.add_channel_button.click()
     time.sleep(5)
     NewChannelName = ("AutoTestNameOnly_" + ''.join(choice(digits) for i in range(3)))
     page.channel_name.send_keys(NewChannelName)
     ChannelNameList.append(NewChannelName)
     page.save_button.click()
     time.sleep(5)
     page.search_field.send_keys(NewChannelName)
     time.sleep(2)
     assert page.table_channel_name.get_attribute('textContent') == '  ('+''.join(NewChannelName)+')'
     assert page.table_channel_comission.get_attribute('textContent') == '' #FAILED FOR PERCENTAGE - Bug 3110
     assert page.table_channel_phonenumber.get_attribute('textContent') == ''
     assert page.table_channel_email.get_attribute('textContent') == ''
     page.table_channel_editbutton.click()
     time.sleep(5)
     assert page.channel_name.get_attribute('value') == NewChannelName
     assert page.status_checkbox.is_selected() == True
     page.cancel_button.click()
     time.sleep(7)
     page = NavigationBar()
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(ActivityName)
     page.first_tickets_type.send_keys('1')
     time.sleep(5)
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate = str(random.randint(2, 30))
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours = str(random.randint(2, 10))
     minutes_values = ('00', '15', '30', '45')
     EventTimeMinutes = random.choice(minutes_values)
     timeday = random.choice(('AM', 'PM'))
     EventTimeWithZone = (EventTimeHours + ':' + ''.join(EventTimeMinutes) + ' ' + ''.join(timeday) + ' ' + ''.join(
         ActivityTimezone))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone)
     time.sleep(5)
     page.enter_customer_information_button.click()
     FirstName = "Alexey"
     page.first_name.send_keys(FirstName)
     LastName = "Kolennikov"
     page.last_name.send_keys(LastName)
     EmailAddress = '*****@*****.**'
     page.email_address.send_keys(EmailAddress)
     page.complete_booking_button.click()
     time.sleep(2)
     select = Select(page.channel_list)
     time.sleep(5)
     select.select_by_visible_text(NewChannelName)
     assert select.first_selected_option.text == NewChannelName
 def test_213(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ChannelPage()
     page.open()
     page.add_channel_button.click()
     time.sleep(5)
     NewUserName = ("AutoTest_" + ''.join(choice(digits) for i in range(4)))
     page.username_field.send_keys(NewUserName)
     NewUserPassword = ('' + ''.join(choice(digits)
                                     for i in range(8)) + 'qwer')
     page.password_field.send_keys(NewUserPassword)
     NewChannelName = ("AutoTest_" +
                       ''.join(choice(digits) for i in range(3)))
     ChannelNameList.append(NewChannelName)
     page.channel_name.send_keys(NewChannelName)
     first_names = ('Ivan', 'Peter', 'John', 'Bill', 'Michael', 'Sidor',
                    'Alex', 'James')
     NewFirstName = random.choice(first_names)
     page.first_name_field.send_keys(NewFirstName)
     last_names = ('Smith', 'Baker', 'Petroff', 'Smirnoff', 'Black',
                   'White', 'Broun', 'Ivanoff')
     NewLastName = random.choice(last_names)
     ChannelFirstLastNameList.append(NewFirstName + ' ' +
                                     ''.join(NewLastName))
     page.last_name_field.send_keys(NewLastName)
     NewHouseNumber = '2345'
     page.house_number_field.send_keys(NewHouseNumber)
     NewStreet = 'Main Street'
     page.street_field.send_keys(NewStreet)
     select = Select(page.country_list)
     NewCountry = 'United States'
     select.select_by_visible_text(NewCountry)
     time.sleep(5)
     select = Select(page.state_list)
     NewState = 'Florida'
     select.select_by_visible_text(NewState)
     NewCity = "Miami"
     page.city_field.send_keys(NewCity)
     NewZipCode = '56788'
     page.zip_code.send_keys(NewZipCode)
     NewPhone1 = ('' + ''.join(choice(digits) for i in range(10)))
     page.phone1_field.send_keys(NewPhone1)
     NewPhone2 = ('' + ''.join(choice(digits) for i in range(10)))
     page.phone2_field.send_keys(NewPhone2)
     NewEmail = ('' + ''.join(choice(digits)
                              for i in range(10)) + '@mailinator.com')
     page.email_field.send_keys(NewEmail)
     select = Select(page.comission_type_list)
     NewComissionType = 'Percentage'
     select.select_by_visible_text(NewComissionType)
     NewComissionAmount = '15'
     page.comission_amount.send_keys(NewComissionAmount)
     NewBankName = 'BSB'
     page.bank_name_field.send_keys(NewBankName)
     select = Select(page.bank_account_type)
     NewAccountType = 'Savings'
     select.select_by_visible_text(NewAccountType)
     NewRoutingNumber = ('' + ''.join(choice(digits) for i in range(10)))
     page.routing_number_field.send_keys(NewRoutingNumber)
     NewAccountNumber = ('' + ''.join(choice(digits) for i in range(10)))
     page.account_number_field.send_keys(NewAccountNumber)
     page.save_button.click()
     time.sleep(5)
     page.search_field.send_keys(NewChannelName)
     time.sleep(2)
     assert page.table_channel_name.get_attribute(
         'textContent') == NewFirstName + ' ' + ''.join(
             NewLastName) + ' (' + ''.join(NewChannelName) + ')'
     assert page.table_channel_comission.get_attribute(
         'textContent') == NewComissionAmount + '%'
     assert page.table_channel_phonenumber.get_attribute(
         'textContent') == NewPhone1
     assert page.table_channel_email.get_attribute(
         'textContent') == NewEmail
     page.table_channel_editbutton.click()
     time.sleep(5)
     assert page.username_field.get_attribute('value') == NewUserName
     assert page.channel_name.get_attribute('value') == NewChannelName
     assert page.first_name_field.get_attribute('value') == NewFirstName
     assert page.last_name_field.get_attribute('value') == NewLastName
     assert page.house_number_field.get_attribute('value') == NewHouseNumber
     assert page.street_field.get_attribute('value') == NewStreet
     select = Select(page.country_list)
     assert select.first_selected_option.text == NewCountry
     select = Select(page.state_list)
     assert select.first_selected_option.text == NewState
     assert page.city_field.get_attribute('value') == NewCity
     assert page.zip_code.get_attribute('value') == NewZipCode
     assert page.phone1_field.get_attribute('value') == NewPhone1
     assert page.phone2_field.get_attribute('value') == NewPhone2
     assert page.email_field.get_attribute('value') == NewEmail
     select = Select(page.comission_type_list)
     assert select.first_selected_option.text == NewComissionType
     assert page.bank_name_field.get_attribute('value') == NewBankName
     select = Select(page.bank_account_type)
     assert select.first_selected_option.text == NewAccountType
     assert page.routing_number_field.get_attribute(
         'value') == NewRoutingNumber
     assert page.account_number_field.get_attribute(
         'value') == NewAccountNumber
     assert page.status_checkbox.is_selected() == True
     page.cancel_button.click()
     time.sleep(7)
     page = NavigationBar()
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(ActivityName)
     page.first_tickets_type.send_keys('1')
     time.sleep(5)
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate = str(random.randint(2, 30))
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours = str(random.randint(2, 10))
     minutes_values = ('00', '15', '30', '45')
     EventTimeMinutes = random.choice(minutes_values)
     timeday = random.choice(('AM', 'PM'))
     EventTimeWithZone = (EventTimeHours + ':' + ''.join(EventTimeMinutes) +
                          ' ' + ''.join(timeday) + ' ' +
                          ''.join(ActivityTimezone))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone)
     time.sleep(5)
     page.enter_customer_information_button.click()
     FirstName = "Alexey"
     page.first_name.send_keys(FirstName)
     LastName = "Kolennikov"
     page.last_name.send_keys(LastName)
     EmailAddress = '*****@*****.**'
     page.email_address.send_keys(EmailAddress)
     page.complete_booking_button.click()
     time.sleep(2)
     select = Select(page.channel_list)
     time.sleep(5)
     select.select_by_visible_text(NewChannelName)
     assert select.first_selected_option.text == NewChannelName
 def test_985(self):
     page = EventCalendarPage()
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityNameList[0])
     time.sleep(2)
     page.hide_events.click()
     time.sleep(5)
     page.date_picker.click()
     time.sleep(2)
     page.date_picker_next.click()
     EventDate = str(random.choice(DateList))
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute(
                 "textContent") == EventDate:
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     nextMonthDate = datetime.date.today() + relativedelta(months=1)
     FullEventDate = (nextMonthDate.strftime("%B") + ' ' +
                      ''.join(EventDate))
     assert str(FullEventDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:  # STEP25
         for i in range(0, len(page.day_slots)):
             if TimeList[0] in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
             else:
                 continue
         break
     time.sleep(6)
     assert FullEventDate in page.date_time_title.get_attribute(
         'textContent')
     assert ActivityNameList[0] == page.activity_name_title.get_attribute(
         'textContent')
     assert TimeList[0] in page.date_time_title.get_attribute('textContent')
     assert page.event_status.get_attribute(
         "textContent") == 'Pending'  #STEP4
     assert 'Ticket Sold: 0' in page.manifest_title.get_attribute(
         "innerText")
     page.add_booking_button.click()  #STEP5
     time.sleep(5)
     page = AdminBookingPage()
     time.sleep(5)
     page.first_tickets_type.send_keys('3')  #STEP6
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent"
     ) == 'Minimum number of tickets (4 tickets) for the event has not been met yet. Do you want to continue?'
     page.alert_cancel_button.click()  # STEP7
     time.sleep(5)
     assert page.is_element_present(
         'enter_customer_information_button') == False
     page.first_tickets_type.clear()
     page.first_tickets_type.send_keys('4')  # STEP8
     time.sleep(5)
     page.enter_customer_information_button.click()  #STEP9
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  # STEP10
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()
     time.sleep(5)
     wait = WebDriverWait(get_driver(), 15)
     wait.until(lambda driver: page.is_element_present('payment_type_list'))
     select = Select(page.payment_type_list)
     PaymentType = "Cash"  # STEP11
     select.select_by_visible_text(PaymentType)
     page.cash_recieved.click()
     page.submit_booking_button.click()
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent") == 'Booking Successful!'
     page.final_alert_ok_button.click()  # STEP12
     page = EventCalendarPage()  #STEP13
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityNameList[0])
     time.sleep(2)
     page.hide_events.click()
     time.sleep(5)
     page.date_picker.click()
     time.sleep(2)
     page.date_picker_next.click()
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute(
                 "textContent") == EventDate:
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     assert str(FullEventDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:
         for i in range(0, len(page.day_slots)):
             if TimeList[0] in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
             else:
                 continue
         break
     time.sleep(6)
     assert FullEventDate in page.date_time_title.get_attribute(
         'textContent')
     assert ActivityNameList[0] == page.activity_name_title.get_attribute(
         'textContent')
     assert TimeList[0] in page.date_time_title.get_attribute('textContent')
     assert page.event_status.get_attribute("textContent") == 'Closed'
     assert 'Tickets Sold: 4' in page.manifest_title.get_attribute(
         "innerText")
     assert page.customer_name_link.get_attribute(
         'textContent') == NewFullName
     assert page.email_link.get_attribute('textContent') == NewEmail
     assert page.add_booking_button.is_enabled() == False  #STEP14
Exemplo n.º 12
0
 def test_511(self):
     page = NavigationBar()
     page.open()
     time.sleep(2)
     page.main_actions_drop_down.click()
     time.sleep(2)
     page.add_a_booking.click()  #STEP1
     page = AdminBookingPage()
     select = Select(page.activity_list)
     select.select_by_visible_text(Activity1)  #STEP2
     page.first_tickets_type.send_keys('1')  #STEP3
     time.sleep(5)
     page.datepicker_next_month.click()
     time.sleep(5)
     EventDate = str(random.randint(2, 27))  #STEP4
     for i in range(0, len(page.dates)):
         if page.dates[i].get_attribute("textContent") == EventDate:
             page.dates[i].click()
         else:
             continue
         break
     time.sleep(5)
     EventTimeHours = '9'
     EventTimeMinutes = '00'
     timeday = 'PM'
     EventTimeWithZone = (EventTimeHours + ':' + ''.join(EventTimeMinutes) +
                          ' ' + ''.join(timeday) + ' ' +
                          ''.join(ActivityTimezone))
     NextMonthName = (datetime.now() +
                      relativedelta(months=1)).strftime("%B")
     NewFullDate = (NextMonthName + ' ' + ''.join(str(EventDate)))
     select = Select(page.time)
     select.select_by_visible_text(EventTimeWithZone)  #STEP5
     time.sleep(5)
     page.enter_customer_information_button.click()  #STEP6
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  #STEP7
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     page.complete_booking_button.click()
     time.sleep(12)
     select = Select(page.payment_type_list)
     PaymentType = "Cash"  #STEP8
     select.select_by_visible_text(PaymentType)
     page.cash_recieved.click()
     page.submit_booking_button.click()
     time.sleep(5)
     page = EventCalendarPage()  #STEP10
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(Activity2)
     page.hide_events.click()
     time.sleep(2)
     page.date_picker.click()
     time.sleep(2)
     page.date_picker_next.click()
     for i in range(0, len(page.days_date_picker)):
         if page.days_date_picker[i].get_attribute("textContent") == str(
                 EventDate):
             page.days_date_picker[i].click()
         else:
             continue
         break
     page.day_button.click()
     time.sleep(6)
     EventTime = (EventTimeHours + ':' + ''.join(EventTimeMinutes) + ' ' +
                  ''.join(timeday))
     assert str(NewFullDate) in page.date_header.get_attribute(
         "textContent")
     for ticket in page.day_slots:  #STEP11
         for i in range(0, len(page.day_slots)):
             if EventTime in ticket.day_slot_time[i].get_attribute(
                     'textContent'):
                 page.day_slots[i].click()
             else:
                 continue
         break
     time.sleep(6)
     assert page.event_status.get_attribute('textContent') == 'Closed'
 def test_976(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ActivityHubPage()
     page.open()
     time.sleep(5)
     page.search_activity_field.send_keys(ActivityName)
     time.sleep(5)
     page.activity_actions.click()
     page.edit_activity.click()
     page = AddEditActivityPage()
     time.sleep(15)
     if page.switcher_minimum_enforce.get_attribute(
             "outerHTML"
     ) != switcher_OFF and page.ticket_minimum.get_attribute(
             'value') == '3' and page.switchers2[0].get_attribute(
                 "outerHTML") == switcher_OFF:  #First Sale Closes Event:
         page.cancel_button.click()
     else:
         if page.switcher_minimum_enforce.get_attribute(
                 "outerHTML") == switcher_OFF:
             page.switcher_minimum_enforce.click()
             time.sleep(2)
             assert page.switcher_minimum_enforce.get_attribute(
                 "outerHTML") != switcher_OFF  #Tickets Minimum Enforce
         if page.ticket_minimum.get_attribute('value') != '3':
             page.ticket_minimum.clear()
             page.ticket_minimum.send_keys('3')
         if page.switchers2[0].get_attribute("outerHTML") != switcher_OFF:
             page.switchers2[0].click()
             time.sleep(2)
             assert page.switchers2[0].get_attribute(
                 "outerHTML") == switcher_OFF  #First Sale Closes Event:
         page.save_button.click()
     time.sleep(5)
     page = EventCalendarPage()  # STEP1
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     time.sleep(5)
     page.hide_events.click()
     time.sleep(5)
     page.event_tickets[0].click()
     time.sleep(5)
     for i in range(0, len(page.event_tickets)):
         if 'Ticket Sold: 0' not in page.manifest_title.get_attribute(
                 "innerText"):
             page.close_button.click()
             time.sleep(5)
             page.event_tickets[i + 1].click()
             time.sleep(5)
             continue
         else:
             time.sleep(5)
             EventHeaderDateTimeList.append(
                 page.date_time_title.get_attribute('textContent'))
             page.add_booking_button.click()  # STEP2
         break
     time.sleep(5)
     page = AdminBookingPage()
     time.sleep(5)
     page.first_tickets_type.send_keys('3')  # STEP3
     time.sleep(5)
     page.enter_customer_information_button.click()  # STEP4
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  # STEP5
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()  # STEP6
     time.sleep(5)
     wait = WebDriverWait(get_driver(), 15)
     wait.until(lambda driver: page.is_element_present('payment_type_list'))
     select = Select(page.payment_type_list)  # STEP7
     PaymentType = "Credit Card"
     select.select_by_visible_text(PaymentType)
     select = Select(page.credit_card_list)
     time.sleep(5)
     select.select_by_visible_text('New Card')
     time.sleep(5)
     get_driver().switch_to.frame(page.stripe)
     page.card_number_input.send_keys(CC_Number)
     page.card_date_input.send_keys(ExpDate)
     page.card_cvc_input.send_keys(CVC)
     page.card_zip_input.send_keys(CCZip)
     get_driver().switch_to.default_content()
     page.submit_booking_button.click()  # STEP8
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent") == 'Booking Successful!'
     page.final_alert_ok_button.click()  # STEP9
Exemplo n.º 14
0
 def test_864(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ActivityHubPage()
     page.open()
     time.sleep(5)
     page.search_activity_field.send_keys(ActivityName)
     time.sleep(5)
     page.activity_actions.click()
     page.edit_activity.click()
     page = AddEditActivityPage()
     time.sleep(15)
     if page.switcher_minimum_enforce.get_attribute(
             "outerHTML"
     ) != switcher_OFF and page.ticket_minimum.get_attribute(
             'value') == '3':
         page.cancel_button.click()
     else:
         if page.switcher_minimum_enforce.get_attribute(
                 "outerHTML") == switcher_OFF:
             page.switcher_minimum_enforce.click()
             time.sleep(2)
             assert page.switcher_minimum_enforce.get_attribute(
                 "outerHTML") != switcher_OFF  #Tickets Minimum Enforce
         if page.ticket_minimum.get_attribute('value') != '3':
             page.ticket_minimum.clear()
             page.ticket_minimum.send_keys('3')
         page.save_button.click()
     page = EventCalendarPage()  #STEP1
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     time.sleep(5)
     page.hide_events.click()
     time.sleep(5)
     page.event_tickets[0].click()
     time.sleep(5)
     for i in range(0, len(page.event_tickets)):
         if 'Ticket Sold: 0' not in page.manifest_title.get_attribute(
                 "innerText"):
             page.close_button.click()
             time.sleep(5)
             page.event_tickets[i + 1].click()
             time.sleep(5)
             continue
         else:
             time.sleep(5)
             EventHeaderDateTimeList.append(
                 page.date_time_title.get_attribute('textContent'))
             page.add_booking_button.click()  #STEP2
         break
     time.sleep(5)
     page = AdminBookingPage()
     time.sleep(5)
     page.first_tickets_type.send_keys('1')  # STEP3
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent"
     ) == 'Minimum number of tickets (3 tickets) for the event has not been met yet. Do you want to continue?'
     page.alert_cancel_button.click()  # STEP4
     time.sleep(5)
     page.first_tickets_type.clear()
     page.first_tickets_type.send_keys('2')  # STEP5
     time.sleep(10)
     assert page.final_alert.get_attribute(
         "textContent"
     ) == 'Minimum number of tickets (3 tickets) for the event has not been met yet. Do you want to continue?'
     page.final_alert_ok_button.click()  # STEP6
     time.sleep(5)
     assert page.is_element_present(
         'enter_customer_information_button') == True
     page.enter_customer_information_button.click()  # STEP7
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  # STEP8
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()  # STEP9
     time.sleep(5)
     wait = WebDriverWait(get_driver(), 15)
     wait.until(lambda driver: page.is_element_present('payment_type_list'))
     select = Select(page.payment_type_list)  # STEP10
     PaymentType = "Cash"
     select.select_by_visible_text(PaymentType)
     page.submit_booking_button.click()  # STEP11
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent") == 'Booking Successful!'
     page.final_alert_ok_button.click()  # STEP12
 def test_597(self):
     get_driver().maximize_window()
     page = loginpage()
     page.open()
     page.login_field.send_keys(admin_login)
     page.password_field.send_keys(admin_password)
     page.button.click()
     page = ActivityHubPage()
     page.open()
     time.sleep(5)
     page.search_activity_field.send_keys(ActivityName)
     time.sleep(5)
     page.activity_actions.click()
     page.edit_activity.click()
     page = AddEditActivityPage()
     time.sleep(15)
     if page.ticket_maximum.get_attribute("value") == '10':
         page.cancel_button.click()
     else:
         page.ticket_maximum.clear()
         page.ticket_maximum.send_keys('10')
         page.save_button.click()
     time.sleep(5)
     page = EventCalendarPage()  # STEP1
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     time.sleep(5)
     page.hide_events.click()
     time.sleep(5)
     page.event_tickets[0].click()
     time.sleep(5)
     for i in range(0, len(page.event_tickets)):
         if 'Ticket Sold: 0' not in page.manifest_title.get_attribute(
                 "innerText"):
             page.close_button.click()
             time.sleep(5)
             page.event_tickets[i + 1].click()
             time.sleep(5)
             continue
         else:
             time.sleep(5)
             EventHeaderDateTimeList.append(
                 page.date_time_title.get_attribute('textContent'))
             page.add_booking_button.click()  # STEP2
         break
     time.sleep(5)
     page = AdminBookingPage()
     time.sleep(5)
     page.first_tickets_type.send_keys('5')  # STEP3
     time.sleep(5)
     page.second_tickets_type.send_keys('5')
     page.enter_customer_information_button.click()  # STEP6
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  # STEP7
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()
     time.sleep(5)
     wait = WebDriverWait(get_driver(), 15)
     wait.until(lambda driver: page.is_element_present('payment_type_list'))
     select = Select(page.payment_type_list)  # STEP8
     PaymentType = "Cash"
     select.select_by_visible_text(PaymentType)
     page.cash_recieved.click()
     page.submit_booking_button.click()
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent") == 'Booking Successful!'
     page.final_alert_ok_button.click()  # STEP9
     page = EventCalendarPage()  # STEP10
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     time.sleep(5)
     page.hide_events.click()
     time.sleep(5)
     page.event_tickets[0].click()
     time.sleep(5)
     for i in range(0, len(page.event_tickets)):  # STEP11
         if EventHeaderDateTimeList[
                 0] != page.date_time_title.get_attribute('textContent'):
             page.close_button.click()
             time.sleep(5)
             page.event_tickets[i + 1].click()
             time.sleep(5)
             continue
         else:
             time.sleep(5)
             assert 'Tickets Sold: 10' in page.manifest_title.get_attribute(
                 "innerText")
             assert 'Ticket Available: 0' in page.manifest_title.get_attribute(
                 "innerText")
             assert '5 Adult' in page.manifest_tickets.get_attribute(
                 "innerText")
             assert '5 Child' in page.manifest_tickets.get_attribute(
                 "innerText")
             page.add_booking_button.click()  # STEP12
         break
     time.sleep(5)
     page = AdminBookingPage()
     time.sleep(5)
     page.first_tickets_type.send_keys('1')  # STEP13
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent"
     ) == 'Booking 1 tickets will overbook this event.  Do you want to continue?'
     page.final_alert_ok_button.click()
     page.second_tickets_type.send_keys('1')
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent"
     ) == 'Booking 2 tickets will overbook this event.  Do you want to continue?'
     page.final_alert_ok_button.click()  # STEP14
     time.sleep(5)
     time.sleep(5)
     assert page.is_element_present(
         'enter_customer_information_button') == True
     page.enter_customer_information_button.click()  # STEP15
     time.sleep(5)
     NewFirstName = 'James'
     page.first_name.send_keys(NewFirstName)  # STEP16
     NewLastName = 'James'
     NewFullName = NewFirstName + ' ' + ''.join(NewLastName)
     page.last_name.send_keys(NewLastName)
     NewEmail = ('*****@*****.**')
     page.email_address.send_keys(NewEmail)
     time.sleep(10)
     page.complete_booking_button.click()
     time.sleep(5)
     wait = WebDriverWait(get_driver(), 15)
     wait.until(lambda driver: page.is_element_present('payment_type_list'))
     select = Select(page.payment_type_list)  # STEP17
     PaymentType = "Cash"
     select.select_by_visible_text(PaymentType)
     page.cash_recieved.click()
     page.submit_booking_button.click()
     time.sleep(5)
     assert page.final_alert.get_attribute(
         "textContent") == 'Booking Successful!'
     page.final_alert_ok_button.click()  # STEP18
     page = EventCalendarPage()  # STEP19
     page.open()
     time.sleep(2)
     select = Select(page.activity_name)
     select.select_by_visible_text(ActivityName)
     time.sleep(5)
     page.event_tickets[0].click()
     time.sleep(5)
     for i in range(0, len(page.event_tickets)):  # STEP11
         if EventHeaderDateTimeList[
                 0] != page.date_time_title.get_attribute('textContent'):
             page.close_button.click()
             time.sleep(5)
             page.event_tickets[i + 1].click()
             time.sleep(5)
             continue
         else:
             time.sleep(5)
         break
     assert 'Tickets Sold: 12' in page.manifest_title.get_attribute(
         "innerText")
     assert 'Ticket Available: -2' in page.manifest_title.get_attribute(
         "innerText")
     assert '6 Adult' in page.manifest_tickets.get_attribute("innerText")
     assert '6 Child' in page.manifest_tickets.get_attribute("innerText")