@@ -483,6 +483,29 @@ def click_polyp_add_intervention_button(self, polyp_number: int) -> None:
483483 )
484484 )
485485
486+ def populate_select_by_id (
487+ self , field_base : str , polyp_number : int , option : str
488+ ) -> None :
489+ """
490+ Populates a <select> element using a predictable ID pattern based on field name and polyp number.
491+
492+ This method is useful when label-based selectors (e.g., using `right-of(:text(...))`) are unreliable
493+ due to ambiguous or repeated text labels on the page.
494+
495+ Args:
496+ field_base (str): The base name of the field (e.g., "POLYP_PATHOLOGY_LOST").
497+ polyp_number (int): The polyp index (e.g., 1 for the first polyp).
498+ option (str): The value to be selected from the dropdown.
499+
500+ Example:
501+ populate_select_by_id("POLYP_PATHOLOGY_LOST", 1, YesNoOptions.YES)
502+ # Selects 'Yes' in <select id="UI_POLYP_PATHOLOGY_LOST1_1">
503+ """
504+ field_id = f"UI_{ field_base .upper ()} { polyp_number } _1"
505+ locator = self .page .locator (f"select#{ field_id } " )
506+ locator .wait_for (state = "visible" )
507+ locator .select_option (option )
508+
486509
487510class SiteLookupOptions (StrEnum ):
488511 """Enum for site lookup options"""
@@ -685,6 +708,12 @@ class PolypInterventionModalityOptions(StrEnum):
685708 POLYPECTOMY = "17189~Resection"
686709 EMR = "17193~Resection"
687710 ESD = "17520~Resection"
711+ BIOPSY = "17190~Suspicion of cancer"
712+ CHROMOSCOPY = "17198"
713+ HAEMOSTATIC_TECHNIQUE = "17194"
714+ SUBMUCOSAL_LIFT = "203005"
715+ TATTOOING = "17192"
716+ TISSUE_DESTRUCTION = "17191"
688717
689718
690719class PolypInterventionDeviceOptions (StrEnum ):
@@ -695,6 +724,9 @@ class PolypInterventionDeviceOptions(StrEnum):
695724 COLD_SNARE = "17072"
696725 COLD_BIOPSY = "17073~En-bloc"
697726 ENDOSCOPIC_KNIFE = "17531"
727+ HOT_BIOPSY_FORCEPS = "17071~En-bloc"
728+ ARGON_BEAM = "17077"
729+ LASER = "17078"
698730
699731
700732class PolypInterventionExcisionTechniqueOptions (StrEnum ):
@@ -768,3 +800,10 @@ class YesNoUncertainOptions(StrEnum):
768800 YES = "17058"
769801 NO = "17059"
770802 UNCERTAIN = "17105"
803+
804+
805+ class ReasonPathologyLostOptions (StrEnum ):
806+ """Enum for reason pathology lost options"""
807+
808+ LOST_IN_TRANSIT = "200561~~204337"
809+ DESTROYED_DURING_PROCESSING = "200562~~204337"
0 commit comments