Updated tests for new version of selenium
This commit is contained in:
@@ -135,30 +135,30 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
self.save_screenshot('mode_form', sequence=sequence_name)
|
||||
|
||||
if 'mode' in data:
|
||||
field = c.find_element_by_id('id_mode')
|
||||
radio = field.find_element_by_css_selector('input[value=\'{}\']'.format(data['mode']))
|
||||
field = c.find_element(By.ID, 'id_mode')
|
||||
radio = field.find_element(By.CSS_SELECTOR, 'input[value=\'{}\']'.format(data['mode']))
|
||||
radio.click()
|
||||
|
||||
if 'sport' in data:
|
||||
field = c.find_element_by_id('id_sport')
|
||||
radio = field.find_element_by_css_selector('input[value=\'{}\']'.format(data['sport']))
|
||||
field = c.find_element(By.ID, 'id_sport')
|
||||
radio = field.find_element(By.CSS_SELECTOR, 'input[value=\'{}\']'.format(data['sport']))
|
||||
radio.click()
|
||||
|
||||
if 'level' in data:
|
||||
field = c.find_element_by_id('id_level')
|
||||
radio = field.find_element_by_css_selector('input[value=\'{}\']'.format(data['level']))
|
||||
field = c.find_element(By.ID, 'id_level')
|
||||
radio = field.find_element(By.CSS_SELECTOR, 'input[value=\'{}\']'.format(data['level']))
|
||||
radio.click()
|
||||
|
||||
if 'ski_lift' in data and data['ski_lift']:
|
||||
field = c.find_element_by_id('id_ski_lift')
|
||||
field = c.find_element(By.ID, 'id_ski_lift')
|
||||
field.click()
|
||||
|
||||
field = c.find_element_by_css_selector('input#id_first_day_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_first_day_widget')
|
||||
field.send_keys(data['first_day'])
|
||||
td = c.find_element_by_css_selector('div.datetimepicker-days td.active')
|
||||
td = c.find_element(By.CSS_SELECTOR, 'div.datetimepicker-days td.active')
|
||||
td.click()
|
||||
|
||||
field = c.find_element_by_css_selector('input#id_last_day_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_last_day_widget')
|
||||
field.click()
|
||||
if screenshots:
|
||||
self.save_screenshot('last_date_widget', sequence=sequence_name)
|
||||
@@ -166,74 +166,74 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
field.send_keys(data['last_day'])
|
||||
|
||||
if 'alt_first_day' in data:
|
||||
field = c.find_element_by_css_selector('input#id_alt_first_day_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_alt_first_day_widget')
|
||||
field.send_keys(data['alt_first_day'])
|
||||
|
||||
if 'alt_last_day' in data:
|
||||
field = c.find_element_by_css_selector('input#id_alt_last_day_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_alt_last_day_widget')
|
||||
field.send_keys(data['alt_last_day'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
self.save_screenshot('location_form', sequence=sequence_name)
|
||||
|
||||
if 'country' in data:
|
||||
field = c.find_element_by_id('id_country')
|
||||
field = c.find_element(By.ID, 'id_country')
|
||||
Select(field).select_by_value(data['country'])
|
||||
|
||||
if 'terrain' in data:
|
||||
field = c.find_element_by_id('id_terrain')
|
||||
field = c.find_element(By.ID, 'id_terrain')
|
||||
Select(field).select_by_value(data['terrain'])
|
||||
|
||||
if 'location' in data:
|
||||
field = c.find_element_by_id('id_location')
|
||||
field = c.find_element(By.ID, 'id_location')
|
||||
field.send_keys(data['location'])
|
||||
|
||||
if 'transport_other' in data:
|
||||
field = c.find_element_by_id('id_transport_other')
|
||||
field = c.find_element(By.ID, 'id_transport_other')
|
||||
field.send_keys(data['transport_other'])
|
||||
if 'transport' in data:
|
||||
field = c.find_element_by_id('id_transport')
|
||||
field = c.find_element(By.ID, 'id_transport')
|
||||
Select(field).select_by_value(data['transport'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
self.save_screenshot('journey_form', sequence=sequence_name)
|
||||
|
||||
if 'meeting_point_other' in data:
|
||||
field = c.find_element_by_id('id_meeting_point_other')
|
||||
field = c.find_element(By.ID, 'id_meeting_point_other')
|
||||
field.send_keys(data['meeting_point_other'])
|
||||
if 'meeting_point' in data:
|
||||
field = c.find_element_by_id('id_meeting_point')
|
||||
field = c.find_element(By.ID, 'id_meeting_point')
|
||||
Select(field).select_by_value(data['meeting_point'])
|
||||
|
||||
if 'meeting_time' in data:
|
||||
field = c.find_element_by_css_selector('input#id_meeting_time_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_meeting_time_widget')
|
||||
field.send_keys(data['meeting_time'])
|
||||
if 'departure_time' in data:
|
||||
field = c.find_element_by_css_selector('input#id_departure_time_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_departure_time_widget')
|
||||
field.send_keys(data['departure_time'])
|
||||
|
||||
if 'departure_ride' in data:
|
||||
field = c.find_element_by_id('id_departure_ride')
|
||||
field = c.find_element(By.ID, 'id_departure_ride')
|
||||
field.send_keys(data['departure_ride'])
|
||||
|
||||
if 'return_departure_time' in data:
|
||||
field = c.find_element_by_css_selector('input#id_return_departure_time_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_return_departure_time_widget')
|
||||
field.send_keys(data['return_departure_time'])
|
||||
if 'return_arrival_time' in data:
|
||||
field = c.find_element_by_css_selector('input#id_return_arrival_time_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_return_arrival_time_widget')
|
||||
field.send_keys(data['return_arrival_time'])
|
||||
|
||||
if 'arrival_previous_day' in data and data['arrival_previous_day']:
|
||||
field = c.find_element_by_id('id_arrival_previous_day')
|
||||
field = c.find_element(By.ID, 'id_arrival_previous_day')
|
||||
field.click()
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
@@ -242,18 +242,18 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
self.save_screenshot('accommodation_form', sequence=sequence_name)
|
||||
|
||||
if 'basecamp' in data:
|
||||
field = c.find_element_by_id('id_basecamp')
|
||||
field = c.find_element(By.ID, 'id_basecamp')
|
||||
field.send_keys(data['basecamp'])
|
||||
|
||||
if 'accommodation' in data:
|
||||
field = c.find_element_by_id('id_accommodation')
|
||||
field = c.find_element(By.ID, 'id_accommodation')
|
||||
Select(field).select_by_value(data['accommodation'])
|
||||
|
||||
if 'meals_other' in data:
|
||||
field = c.find_element_by_id('id_meals_other')
|
||||
field = c.find_element(By.ID, 'id_meals_other')
|
||||
field.send_keys(data['meals_other'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
@@ -261,7 +261,7 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
self.save_screenshot('requirements_form', sequence=sequence_name)
|
||||
|
||||
if 'requirements_add' in data:
|
||||
field = c.find_element_by_id('id_requirements')
|
||||
field = c.find_element(By.ID, 'id_requirements')
|
||||
field.send_keys(Keys.RETURN)
|
||||
if isinstance(data['requirements_add'], list):
|
||||
field.send_keys(Keys.RETURN.join(data['requirements_add']))
|
||||
@@ -269,14 +269,14 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
field.send_keys(data['requirements_add'])
|
||||
|
||||
if 'pre_meeting_1' in data:
|
||||
field = c.find_element_by_css_selector('input#id_pre_meeting_1_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_pre_meeting_1_widget')
|
||||
field.send_keys(data['pre_meeting_1'])
|
||||
|
||||
if 'pre_meeting_2' in data:
|
||||
field = c.find_element_by_css_selector('input#id_pre_meeting_2_widget')
|
||||
field = c.find_element(By.CSS_SELECTOR, 'input#id_pre_meeting_2_widget')
|
||||
field.send_keys(data['pre_meeting_2'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
@@ -289,60 +289,60 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
field.send_keys(data['trainer_firstname'])
|
||||
|
||||
if 'trainer_familyname' in data:
|
||||
field = c.find_element_by_id('id_trainer_familyname')
|
||||
field = c.find_element(By.ID, 'id_trainer_familyname')
|
||||
if auth:
|
||||
field.clear()
|
||||
field.send_keys(data['trainer_familyname'])
|
||||
|
||||
if 'trainer_email' in data:
|
||||
field = c.find_element_by_id('id_trainer_email')
|
||||
field = c.find_element(By.ID, 'id_trainer_email')
|
||||
if auth:
|
||||
field.clear()
|
||||
field.send_keys(data['trainer_email'])
|
||||
|
||||
if 'trainer_phone' in data:
|
||||
field = c.find_element_by_id('id_trainer_phone')
|
||||
field = c.find_element(By.ID, 'id_trainer_phone')
|
||||
if auth:
|
||||
field.clear()
|
||||
field.send_keys(data['trainer_phone'])
|
||||
|
||||
if 'trainer_2_fullname' in data:
|
||||
field = c.find_element_by_id('id_trainer_2_fullname')
|
||||
field = c.find_element(By.ID, 'id_trainer_2_fullname')
|
||||
field.send_keys(data['trainer_2_fullname'])
|
||||
|
||||
if 'trainer_3_fullname' in data:
|
||||
field = c.find_element_by_id('id_trainer_3_fullname')
|
||||
field = c.find_element(By.ID, 'id_trainer_3_fullname')
|
||||
field.send_keys(data['trainer_3_fullname'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
self.save_screenshot('registration_form', sequence=sequence_name)
|
||||
|
||||
if 'deadline' in data:
|
||||
field = c.find_element_by_id('id_deadline')
|
||||
radio = field.find_element_by_css_selector('input[value=\'{}\']'.format(data['deadline']))
|
||||
field = c.find_element(By.ID, 'id_deadline')
|
||||
radio = field.find_element(By.CSS_SELECTOR, 'input[value=\'{}\']'.format(data['deadline']))
|
||||
radio.click()
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
self.save_screenshot('charges_form', sequence=sequence_name)
|
||||
|
||||
if 'charge' in data:
|
||||
field = c.find_element_by_id('id_charge')
|
||||
field = c.find_element(By.ID, 'id_charge')
|
||||
field.clear()
|
||||
field.send_keys(data['charge'])
|
||||
|
||||
if 'additional_costs' in data:
|
||||
field = c.find_element_by_id('id_additional_costs')
|
||||
field = c.find_element(By.ID, 'id_additional_costs')
|
||||
field.clear()
|
||||
if data['additional_costs'] is not None:
|
||||
field.send_keys(data['additional_costs'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
@@ -350,49 +350,49 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
if screenshots:
|
||||
self.save_screenshot('training_form', sequence=sequence_name)
|
||||
|
||||
field = c.find_element_by_id('id_course_topic_1')
|
||||
field = c.find_element(By.ID, 'id_course_topic_1')
|
||||
if isinstance(data['course_topic_1'], list):
|
||||
field.send_keys(Keys.RETURN.join(data['course_topic_1']))
|
||||
else:
|
||||
field.send_keys(data['course_topic_1'])
|
||||
|
||||
if 'course_topic_2' in data:
|
||||
field = c.find_element_by_id('id_course_topic_2')
|
||||
field = c.find_element(By.ID, 'id_course_topic_2')
|
||||
field.send_keys(data['course_topic_2'])
|
||||
|
||||
if 'course_topic_3' in data:
|
||||
button = c.find_element_by_id('btn-topic-add')
|
||||
button = c.find_element(By.ID, 'btn-topic-add')
|
||||
button.click()
|
||||
field = c.find_element_by_id('id_course_topic_3')
|
||||
field = c.find_element(By.ID, 'id_course_topic_3')
|
||||
field.send_keys(data['course_topic_3'])
|
||||
|
||||
if 'course_topic_4' in data:
|
||||
button.click()
|
||||
field = c.find_element_by_id('id_course_topic_4')
|
||||
field = c.find_element(By.ID, 'id_course_topic_4')
|
||||
field.send_keys(data['course_topic_4'])
|
||||
|
||||
field = c.find_element_by_id('id_course_goal_1')
|
||||
field = c.find_element(By.ID, 'id_course_goal_1')
|
||||
if isinstance(data['course_goal_1'], list):
|
||||
field.send_keys(Keys.RETURN.join(data['course_goal_1']))
|
||||
else:
|
||||
field.send_keys(data['course_goal_1'])
|
||||
|
||||
if 'course_goal_2' in data:
|
||||
field = c.find_element_by_id('id_course_goal_2')
|
||||
field = c.find_element(By.ID, 'id_course_goal_2')
|
||||
field.send_keys(data['course_goal_2'])
|
||||
|
||||
if 'course_goal_3' in data:
|
||||
button = c.find_element_by_id('btn-goal-add')
|
||||
button = c.find_element(By.ID, 'btn-goal-add')
|
||||
button.click()
|
||||
field = c.find_element_by_id('id_course_goal_3')
|
||||
field = c.find_element(By.ID, 'id_course_goal_3')
|
||||
field.send_keys(data['course_goal_3'])
|
||||
|
||||
if 'course_goal_4' in data:
|
||||
button.click()
|
||||
field = c.find_element_by_id('id_course_goal_4')
|
||||
field = c.find_element(By.ID, 'id_course_goal_4')
|
||||
field.send_keys(data['course_goal_4'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
@@ -400,29 +400,29 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
self.save_screenshot('description_form', sequence=sequence_name)
|
||||
|
||||
if 'title' in data:
|
||||
field = c.find_element_by_id('id_title')
|
||||
field = c.find_element(By.ID, 'id_title')
|
||||
field.clear()
|
||||
field.send_keys(data['title'])
|
||||
|
||||
field = c.find_element_by_id('id_description')
|
||||
field = c.find_element(By.ID, 'id_description')
|
||||
if isinstance(data['description'], list):
|
||||
field.send_keys(Keys.RETURN.join(data['description']))
|
||||
else:
|
||||
field.send_keys(data['description'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
self.save_screenshot('summary_form', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_id('btn-form-back')
|
||||
button = c.find_element(By.ID, 'btn-form-back')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
for i in range(0, 11):
|
||||
try:
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
except NoSuchElementException:
|
||||
@@ -431,13 +431,13 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
self.fail('Too many sub forms')
|
||||
|
||||
if 'internal_note' in data:
|
||||
field = c.find_element_by_id('id_internal_note')
|
||||
field = c.find_element(By.ID, 'id_internal_note')
|
||||
if isinstance(data['internal_note'], list):
|
||||
field.send_keys(Keys.RETURN.join(data['internal_note']))
|
||||
else:
|
||||
field.send_keys(data['internal_note'])
|
||||
|
||||
button = c.find_element_by_id('btn-form-submit')
|
||||
button = c.find_element(By.ID, 'btn-form-submit')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
@@ -445,9 +445,9 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
if screenshots:
|
||||
self.save_screenshot('user_and_event_created_set_password', sequence=sequence_name)
|
||||
|
||||
field = c.find_element_by_id('id_new_password')
|
||||
field = c.find_element(By.ID, 'id_new_password')
|
||||
field.send_keys(TEST_PASSWORD)
|
||||
field = c.find_element_by_id('id_new_password_repeat')
|
||||
field = c.find_element(By.ID, 'id_new_password_repeat')
|
||||
field.send_keys(TEST_PASSWORD)
|
||||
field.send_keys(Keys.RETURN)
|
||||
|
||||
@@ -471,20 +471,20 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
if screenshots:
|
||||
self.save_screenshot('event_list_before', sequence=sequence_name)
|
||||
|
||||
link = c.find_element_by_link_text(title)
|
||||
link = c.find_element(By.LINK_TEXT, title)
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
|
||||
if screenshots:
|
||||
self.save_screenshot('event_details', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_id('btn-clone')
|
||||
button = c.find_element(By.ID, 'btn-clone')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
for i in range(0, 11):
|
||||
try:
|
||||
button = c.find_element_by_id('btn-form-next')
|
||||
button = c.find_element(By.ID, 'btn-form-next')
|
||||
except NoSuchElementException:
|
||||
break
|
||||
|
||||
@@ -492,8 +492,8 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
self.save_screenshot('form', sequence=sequence_name)
|
||||
|
||||
try:
|
||||
field = c.find_element_by_id('id_deadline')
|
||||
radio = field.find_element_by_css_selector('input[value=\'OTHER\']')
|
||||
field = c.find_element(By.ID, 'id_deadline')
|
||||
radio = field.find_element(By.CSS_SELECTOR, 'input[value=\'OTHER\']')
|
||||
radio.click()
|
||||
except NoSuchElementException:
|
||||
pass
|
||||
@@ -506,7 +506,7 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
if screenshots:
|
||||
self.save_screenshot('summary', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_id('btn-form-submit')
|
||||
button = c.find_element(By.ID, 'btn-form-submit')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
@@ -523,28 +523,28 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
link = c.find_element_by_link_text(title)
|
||||
link = c.find_element(By.LINK_TEXT, title)
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
|
||||
action_tabs = c.find_element_by_css_selector('.action-tabs > ul.nav-tabs')
|
||||
tab = action_tabs.find_element_by_link_text(ugettext(u'Ändern'))
|
||||
action_tabs = c.find_element(By.CSS_SELECTOR, '.action-tabs > ul.nav-tabs')
|
||||
tab = action_tabs.find_element(By.LINK_TEXT, ugettext(u'Ändern'))
|
||||
tab.click()
|
||||
self.wait_until_stale(c, tab)
|
||||
|
||||
panels = c.find_elements_by_css_selector('#form-accordion .panel-collapse')
|
||||
panels = c.find_elements(By.CSS_SELECTOR, '#form-accordion .panel-collapse')
|
||||
for panel in panels[:-1]:
|
||||
if screenshots:
|
||||
self.save_screenshot('edit-form', sequence=sequence_name)
|
||||
|
||||
button = panel.find_element_by_partial_link_text(ugettext(u'Nächster Abschnitt'))
|
||||
button = panel.find_element(By.PARTIAL_LINK_TEXT, ugettext(u'Nächster Abschnitt'))
|
||||
button.click()
|
||||
time.sleep(.5)
|
||||
|
||||
if screenshots:
|
||||
self.save_screenshot('edit-form', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_css_selector('form button[type="submit"]')
|
||||
button = c.find_element(By.CSS_SELECTOR, 'form button[type="submit"]')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
@@ -561,26 +561,26 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
if screenshots:
|
||||
self.save_screenshot('event_list_before', sequence=sequence_name)
|
||||
|
||||
link = c.find_element_by_link_text(title)
|
||||
link = c.find_element(By.LINK_TEXT, title)
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
|
||||
if screenshots:
|
||||
self.save_screenshot('event_details', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_id('btn-accept')
|
||||
button = c.find_element(By.ID, 'btn-accept')
|
||||
button.click()
|
||||
time.sleep(.5)
|
||||
if screenshots:
|
||||
self.save_screenshot('accept_modal', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_css_selector('#modal-accept-dialog a.btn-success')
|
||||
button = c.find_element(By.CSS_SELECTOR, '#modal-accept-dialog a.btn-success')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
self.save_screenshot('accepted', sequence=sequence_name)
|
||||
|
||||
link = c.find_element_by_link_text(ugettext('Veranstaltungsliste'))
|
||||
link = c.find_element(By.LINK_TEXT, ugettext('Veranstaltungsliste'))
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
if screenshots:
|
||||
@@ -599,26 +599,26 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
if screenshots:
|
||||
self.save_screenshot('event_list_before', sequence=sequence_name)
|
||||
|
||||
link = c.find_element_by_link_text(title)
|
||||
link = c.find_element(By.LINK_TEXT, title)
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
|
||||
if screenshots:
|
||||
self.save_screenshot('event_details', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_id('btn-confirmpublication')
|
||||
button = c.find_element(By.ID, 'btn-confirmpublication')
|
||||
button.click()
|
||||
time.sleep(.5)
|
||||
if screenshots:
|
||||
self.save_screenshot('confirmpublication_modal', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_css_selector('#btn-confirmpublication-{}'.format(channel))
|
||||
button = c.find_element(By.CSS_SELECTOR, '#btn-confirmpublication-{}'.format(channel))
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
self.save_screenshot('confirmed_{}'.format(channel), sequence=sequence_name)
|
||||
|
||||
link = c.find_element_by_link_text(ugettext('Veranstaltungsliste'))
|
||||
link = c.find_element(By.LINK_TEXT, ugettext('Veranstaltungsliste'))
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
if screenshots:
|
||||
@@ -637,20 +637,20 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
if screenshots:
|
||||
self.save_screenshot('event_list_before', sequence=sequence_name)
|
||||
|
||||
link = c.find_element_by_link_text(title)
|
||||
link = c.find_element(By.LINK_TEXT, title)
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
|
||||
if screenshots:
|
||||
self.save_screenshot('event_details', sequence=sequence_name)
|
||||
|
||||
button = c.find_element_by_id('btn-confirmclearance')
|
||||
button = c.find_element(By.ID, 'btn-confirmclearance')
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
if screenshots:
|
||||
self.save_screenshot('confirmed_clearance', sequence=sequence_name)
|
||||
|
||||
link = c.find_element_by_link_text(ugettext('Veranstaltungsliste'))
|
||||
link = c.find_element(By.LINK_TEXT, ugettext('Veranstaltungsliste'))
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
if screenshots:
|
||||
@@ -688,7 +688,7 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
self.create_event(TEST_EVENT_DATA_W, auth=True)
|
||||
self.create_event(TEST_EVENT_DATA_M, auth=True)
|
||||
|
||||
link = c.find_element_by_link_text(TEST_EVENT_DATA_W['title'])
|
||||
link = c.find_element(By.LINK_TEXT, TEST_EVENT_DATA_W['title'])
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
self.save_screenshot('owner_event_details')
|
||||
@@ -730,7 +730,7 @@ class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||
button.click()
|
||||
self.wait_until_stale(c, button)
|
||||
|
||||
link = c.find_element_by_partial_link_text(ugettext(u'Veranstaltungsliste herunterladen'))
|
||||
link = c.find_element(By.PARTIAL_LINK_TEXT, ugettext(u'Veranstaltungsliste herunterladen'))
|
||||
link.click()
|
||||
self.wait_until_stale(c, link)
|
||||
self.save_screenshot('event_export_form')
|
||||
|
||||
Reference in New Issue
Block a user