from allure_commons._allure import step from src.ui_elements.dropdown_ui_element import DropDownUIElement class MarketDDUIElement(DropDownUIElement): @step('Select {option} option from {0}') def select_region(self, option): self._element.click() choice = self.page.locator(f"//*[contains(@class, 'region') and text()='{option}']") choice.click() self.verify_chosen(option)