Exemplo n.º 1
0
    def enter_foreign_master_vendor_address(self, sam_type, country_code):
        self.select_sam_address_type(sam_type)
        self.element_click(self._search_for_country)
        country = LookUpCountryWindow(self.driver)
        country.select_country(country_code)
        result = self.driver.find_element(By.ID, self._override_address_box).is_selected()
        if result:
            print('Checkbox already selected')
        else:
            self.driver.find_element(By.ID, self._override_address_box).click()
            print('Checkbox selected')

        self.enter_address_one()
        self.enter_address_two()
        self.enter_city()
        self.enter_postal_code()

        if country_code == "GBR":
            self.search_for_state()
            county = LookUpStateWindow(self.driver)
            county.select_county(str(choice(GBR_COUNTIES)))
        else:
            self.search_for_state()
            state = LookUpStateWindow(self.driver)
            state.select_random_state()
Exemplo n.º 2
0
    def enter_foreign_master_vendor_address(self, sam_type, country_code):
        self.select_sam_address_type(sam_type)
        self.enter_country_code(country_code)
        self.click_override_address_verification_chkbx()
        self.enter_address_one()
        self.enter_address_two()
        self.enter_city()
        self.enter_postal_code()

        if country_code == "GBR":
            self.search_for_state()
            county = LookUpStateWindow(self.driver)
            county.select_county(str(choice(GBR_COUNTIES)))
        else:
            self.search_for_state()
            state = LookUpStateWindow(self.driver)
            state.select_random_state()