def click_a_value(self, button_locator_name: str): # TODO: MyWebElement would need to store locators to enable this check # TODO: check if the button.locator is in the accepted list # if button.locator in _BUTTON_LOCATORS: # button.click() # else: # report problems, raise errors if button_locator_name in self.BUTTONS: button = MyWebElement(_we=self.body.find_element_by_xpath(self.locators[button_locator_name])) else: print("Button name '{0}' not supported".format(button_locator_name)) raise ValueError print("clicking value = {}".format(button_locator_name)) button.click()
def find_birthday_field(self) -> MyWebElement: return MyWebElement( _we=self.body.find_element_by_xpath(self.locators[self._BIRTHDAY]))
def kid_field(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[self._KID]))
def find_beihilfesatz_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._BEIHILFESATZ]))
def find_versicherungsbeginn_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._VERSICHERUNGSBEGINN]))
def find_klinik_einbett_description(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._KLINIK_EINBETT]))
def find_offer_description(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._OFFER_DESCRIPTION]))
def find_lebensjahr67_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self.Lebensjahr67]))
def find_callback_ruckruf_anfordern(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._RUCKRUF_ANFORDERN]))
def find_callback_name_field(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._CALLBACK_NAME]))
def find_ok_button(self) -> MyWebElement: return MyWebElement( _we=self.body.find_element_by_xpath(self.locators[self._OK]))
def find_grundversicherung_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[self.GRUNDVERSICHERUNG]))
def find_beste_absicherung_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[self.ABSICHERUNG]))
def find_preis_leistung_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[self.PREIS]))
def find_nationality_field(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._NATIONALITY]))
def find_termin_vereinbaren(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._TERMIN_VEREINBAREN]))
def find_submit_button(self) -> MyWebElement: return MyWebElement( _we=self.body.find_element_by_xpath(self.locators[self._SUBMIT]))
def find_final_time(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._FINAL_TIME]))
def find_uebertragungswert_input(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self.Uebertragungswert]))
def find_consultation_buttton(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._GET_CONSULTATION]))
def find_first_class_description(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._FIRST_CLASS]))
def find_surname_field(self) -> MyWebElement: return MyWebElement( _we=self.body.find_element_by_xpath(self.locators[self._SURNAME]))
def find_beschaeftigungsstatus_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._BESCHAEFTIGUNG]))
def find_email_field(self) -> MyWebElement: return MyWebElement( _we=self.body.find_element_by_xpath(self.locators[self._EMAIL]))
def find_tarif_button(self) -> MyWebElement: return MyWebElement( _we=self.body.find_element_by_xpath(self.locators[self._TARIF]))
def find_phone_field(self) -> MyWebElement: return MyWebElement( _we=self.body.find_element_by_xpath(self.locators[self._PHONE]))
def find_beihilfetraeger_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._BEIHILFETRAEGER]))
def weiter_button(self) -> MyWebElement: return MyWebElement(_we=self.body.find_element_by_xpath(self.locators[ self._WEITERBUTTON]))