我是python的初学者,我使用for循环重复执行步骤并使用if检查条件,但是如果满足if则不会脱离for循环
for i in range (1 , 30):
admin_reports_alertReports.click_("followUp")
admin_reports_alertReports.click_("messaged")
admin_reports_alertReports.click_("messagedResponded")
admin_reports_alertReports.click_calculate_delivery_recipients_btn()
if not admin_reports_alertReports.assert_element_visible("followupRecipientCount", "1 recipients"):
admin_reports_alertReports.click_("cancelButton")
else:
break
admin_reports_alertReports.click_("followuptemplateSelection")
admin_reports_alertReports.set_("followupSearchBox", "Create New Template\n")