@@ -78,6 +78,8 @@ def __init__(self, page: Page):
7878 self .page = page
7979 self .estimate_whole_polyp_size_string = "Estimate of whole polyp size"
8080 self .polyp_access_string = "Polyp Access"
81+ self .failure_reasons_string = "Failure Reasons"
82+ self .excision_technique_string = "Excision Technique"
8183
8284 def complete_with_result (self , nhs_no : str , result : str ) -> None :
8385 """This method fills out the investigation dataset forms based on the test result and the subject's age.
@@ -109,7 +111,7 @@ def complete_with_result(self, nhs_no: str, result: str) -> None:
109111 self .default_investigation_dataset_forms_continuation ()
110112 InvestigationDatasetsPage (self .page ).click_show_failure_information ()
111113 DatasetFieldUtil (self .page ).populate_select_locator_for_field_inside_div (
112- "Failure Reasons" ,
114+ self . failure_reasons_string ,
113115 "divFailureSection" ,
114116 FailureReasonsOptions .NO_FAILURE_REASONS ,
115117 )
@@ -205,7 +207,7 @@ def investigation_datasets_failure_reason(self) -> None:
205207 # Failure Information
206208 InvestigationDatasetsPage (self .page ).click_show_failure_information ()
207209 DatasetFieldUtil (self .page ).populate_select_locator_for_field_inside_div (
208- "Failure Reasons" ,
210+ self . failure_reasons_string ,
209211 "divFailureSection" ,
210212 FailureReasonsOptions .BLEEDING_INCIDENT ,
211213 )
@@ -262,7 +264,7 @@ def polyps_for_high_risk_result(self) -> None:
262264 "Retrieved" , "divPolypTherapy2_1Section" , YesNoOptions .NO
263265 )
264266 DatasetFieldUtil (self .page ).populate_select_locator_for_field_inside_div (
265- "Excision Technique" ,
267+ self . excision_technique_string ,
266268 "divPolypTherapy2_1Section" ,
267269 PolypInterventionExcisionTechniqueOptions .EN_BLOC ,
268270 )
@@ -307,7 +309,7 @@ def polyp1_intervention(self) -> None:
307309 "Retrieved" , "divPolypTherapy1_1Section" , YesNoOptions .NO
308310 )
309311 DatasetFieldUtil (self .page ).populate_select_locator_for_field_inside_div (
310- "Excision Technique" ,
312+ self . excision_technique_string ,
311313 "divPolypTherapy1_1Section" ,
312314 PolypInterventionExcisionTechniqueOptions .EN_BLOC ,
313315 )
@@ -440,8 +442,6 @@ def complete_dataset_with_args(
440442 DatasetFieldUtil (self .page ).populate_select_locator_for_field (
441443 "Late outcome" , value
442444 )
443- case _:
444- pass
445445
446446 # Completion Proof Information
447447 if completion_information :
@@ -455,7 +455,7 @@ def complete_dataset_with_args(
455455 # Failure Information
456456 InvestigationDatasetsPage (self .page ).click_show_failure_information ()
457457 DatasetFieldUtil (self .page ).populate_select_locator_for_field_inside_div (
458- "Failure Reasons" ,
458+ self . failure_reasons_string ,
459459 "divFailureSection" ,
460460 failure_information ["failure reasons" ],
461461 )
@@ -510,8 +510,6 @@ def complete_dataset_with_args(
510510 "divLeftInSitu1" ,
511511 value ,
512512 )
513- case _:
514- pass
515513
516514 if polyp_1_intervention :
517515 InvestigationDatasetsPage (
@@ -553,7 +551,7 @@ def complete_dataset_with_args(
553551 DatasetFieldUtil (
554552 self .page
555553 ).populate_select_locator_for_field_inside_div (
556- "Excision Technique" ,
554+ self . excision_technique_string ,
557555 "divPolypTherapy1_1Section" ,
558556 value ,
559557 )
@@ -565,8 +563,6 @@ def complete_dataset_with_args(
565563 "divPolypAppearsFullyResected1_1" ,
566564 value ,
567565 )
568- case _:
569- pass
570566
571567 if polyp_1_histology :
572568 for key , value in polyp_1_histology .items ():
@@ -651,8 +647,6 @@ def complete_dataset_with_args(
651647 "divTumourFindings1_1" ,
652648 value ,
653649 )
654- case _:
655- pass
656650
657651 InvestigationDatasetsPage (self .page ).check_dataset_complete_checkbox ()
658652 InvestigationDatasetsPage (self .page ).click_save_dataset_button ()
0 commit comments