def test_C108_CheckNoDuplicateEntriesAllowed(self): # Setup office_name = StringMethods.get_unique_name('office_name_') expected_error = 'Duplicate entries are not allowed.' # Action self.offices_page.add_entry(office_name) offices_page = OfficesPage(self.driver) offices_page.add_button.click() add_dialog = OfficesAddDialog(self.driver) add_dialog.name.send_keys(office_name) add_dialog.save_button.click() # Assert add_dialog.is_text_present(expected_error) add_dialog.cancel_button.click() offices_page.remove_entry(office_name)
def remove_office(self, office_name): office_page = OfficesPage(self.driver) office_page.remove_entry(office_name)