Example #1
0
    def clean_belgian_address(self,
                              desc_text="BELGIUM",
                              sam_type="Corporate Info",
                              country_code="BEL",
                              location="Monsiuer Alain Dupont",
                              street="Rue Du Vivier",
                              number="7",
                              city="Bruxelles",
                              postal="1000",
                              province="BC"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_location(location)
        self.ca_enter_street(street)
        self.ca_enter_number_for_belgium(number)
        self.ca_enter_city(city)
        self.ca_enter_postal(postal)
        self.clear_state_field()
        self.search_for_province()

        sel_prov = LookUpStateWindow(self.driver)
        sel_prov.select_state(province)
Example #2
0
    def clean_brazilian_address(self,
                                desc_text="BRAZIL",
                                sam_type="Corporate Info",
                                country_code="BRA",
                                address_1="Rua Escritor Jorge de Limao",
                                address_2="58",
                                city="Barra de Sao Miguel",
                                neighborhood="Barra mar",
                                postal="57180-000",
                                state="AL"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_neighborhood(neighborhood)
        self.ca_enter_postal(postal)
        self.clear_state_field()

        self.search_for_state()
        sel_state = LookUpStateWindow(self.driver)
        sel_state.select_state(state)
Example #3
0
    def clean_spain_address(self,
                            desc_text="SPAIN",
                            sam_type="Corporate Info",
                            country_code="ESP",
                            address_1="AC Hotel Coruna",
                            address_2="Enrique Marinas",
                            number="34",
                            door="A",
                            city="Coruna",
                            postal_code="15009",
                            province="C"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.enter_number_for_spain(number)
        self.enter_door_for_spain(door)
        self.ca_enter_city(city)
        self.ca_enter_postal_code(postal_code)

        self.search_for_province()
        sel_prov = LookUpStateWindow(self.driver)
        sel_prov.select_state(province)
Example #4
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()
Example #5
0
    def clean_australian_address(self,
                                 desc_text="AUSTRALIA",
                                 sam_type="Corporate Info",
                                 country_code="AUS",
                                 address_1="The Australian",
                                 address_2="100 Cumberland St",
                                 city="Sydney",
                                 postal="2000",
                                 state="NSW"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal(postal)

        self.search_for_state()
        sel_state = LookUpStateWindow(self.driver)
        sel_state.select_state(state)
Example #6
0
    def clean_argentine_address(self,
                                desc_text="ARGENTINA",
                                sam_type="Corporate Info",
                                country_code="ARG",
                                address_1="Avenida Leandro",
                                address_2="N. Alem 1193",
                                city="Bueno Aires",
                                postal="1001",
                                state="BA"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal(postal)
        self.search_for_state()

        sel_state = LookUpStateWindow(self.driver)
        sel_state.select_state(state)
Example #7
0
    def clean_canadian_address(self,
                               desc_text="CANADA",
                               sam_type="Corporate Info",
                               country_code="CAN",
                               address_1="Sheraton Hotel",
                               address_2="35 Rue Laurier",
                               city="Gatineau",
                               post_code="J8X 4E9",
                               province="QC"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal_code(post_code)

        self.search_for_province()
        sel_prov = LookUpStateWindow(self.driver)
        sel_prov.select_state(province)
Example #8
0
    def clean_united_kingdom_address(self,
                                     desc_text="UNITED KINGDOM",
                                     sam_type="Corporate Info",
                                     country_code="GBR",
                                     address_1="160 Warfside Street",
                                     address_2="The Mailbox",
                                     city="Birmingham",
                                     post_code="B1 1RL",
                                     state="WSTMID"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal_code(post_code)

        self.search_for_county()
        sel_county = LookUpStateWindow(self.driver)
        sel_county.select_state(state)
Example #9
0
    def clean_swiss_address(self,
                            desc_text="SWITZERLAND",
                            sam_type="Corporate Info",
                            country_code="CHE",
                            address_1="The Cambrian, Abelboden",
                            address_2="Dorfstrasse 7",
                            city="Adelboden",
                            postal="3715",
                            canton="BE"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal(postal)

        self.search_for_canton()
        sel_canton = LookUpStateWindow(self.driver)
        sel_canton.select_state(canton)
Example #10
0
    def clean_germany_address(self,
                              desc_text="GERMANY",
                              sam_type="Corporate Info",
                              country_code="DEU",
                              address_1="Moxy Munich Messe",
                              address_2="Otto-Hahn 21",
                              city="Aschheim",
                              postal="85609",
                              state="BY"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal_code(postal)

        self.search_for_state()
        sel_state = LookUpStateWindow(self.driver)
        sel_state.select_state(state)
Example #11
0
    def clean_malaysian_address(self,
                                desc_text="MALAYSIA",
                                sam_type="Corporate Info",
                                country_code="MYS",
                                address_1="Jalan Pantai 3",
                                address_2="Dessaru",
                                city="Bandar Penawar",
                                postal="81930",
                                state="01"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal(postal)

        self.search_for_state()
        sel_state = LookUpStateWindow(self.driver)
        sel_state.select_state(state)
Example #12
0
    def clean_italian_address(self,
                              desc_text="ITALY",
                              sam_type="Corporate Info",
                              country_code="ITA",
                              address_1="Via Bruno Buozzi, 35",
                              address_2="Bldg. 3",
                              city="Bozano",
                              cap="39100",
                              province="BZ"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_cap(cap)

        self.search_for_province()
        sel_prov = LookUpStateWindow(self.driver)
        sel_prov.select_state(province)
Example #13
0
    def clean_germany_po_address(self,
                                 desc_text="GERMANY (PO BOX)",
                                 sam_type="Corporate Info",
                                 country_code="DEU",
                                 address_1="Sitfung Warentest",
                                 po_box="Postfach 3 14 41",
                                 city="Berlin",
                                 postal="10724",
                                 state="BE"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_po_address(po_box)
        self.ca_enter_city(city)
        self.ca_enter_postal_code(postal)

        self.search_for_state()
        sel_state = LookUpStateWindow(self.driver)
        sel_state.select_state(state)
Example #14
0
    def clean_indian_address(self,
                             desc_text="INDIA",
                             sam_type="Corporate Info",
                             country_code="IND",
                             address_1="1234 Test Street",
                             address_2="BLDG 3",
                             city="Chennai",
                             post_code="600073",
                             state="TN"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal_code(post_code)

        self.search_for_state()
        sel_state = LookUpStateWindow(self.driver)
        sel_state.select_state(state)
Example #15
0
    def clean_japanese_address(self,
                               desc_text="JAPAN",
                               sam_type="Corporate Info",
                               country_code="JPN",
                               address_1="1-1-43 ABENO-SUJI",
                               address_2="ABENO-KU",
                               city="Osaka",
                               postal="545-0052",
                               prefecture="27"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal(postal)

        self.clear_state_field()  # Clear Prefecture field
        self.search_for_prefecture()
        sel_pref = LookUpStateWindow(self.driver)
        sel_pref.select_state(prefecture)
Example #16
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()
Example #17
0
    def clean_netherlands_address(self,
                                  desc_text="NETHERLANDS",
                                  sam_type="Corporate Info",
                                  country_code="NLD",
                                  location="Amsterdam Marriott Hotel",
                                  street="Stadhouderskade",
                                  number="12",
                                  city="Amsterdam",
                                  postal="1054 ES",
                                  community="0776"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_location(location)
        self.ca_enter_street(street)
        self.enter_number_for_netherlands(number)
        self.ca_enter_city(city)
        self.ca_enter_postal_code(postal)

        self.search_for_community()
        sel_comm = LookUpStateWindow(self.driver)
        sel_comm.select_state(community)
Example #18
0
    def clean_mexican_address(self,
                              desc_text="MEXICO",
                              sam_type="Corporate Info",
                              country_code="MEX",
                              street_and_num_1="Mission De Los Lagos 9020",
                              street_and_num_2="Partido Iglesias",
                              colony="Ciudad",
                              city="Juarez",
                              post_code="32688",
                              state="CHIH"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(street_and_num_1)
        self.ca_enter_address_two(street_and_num_2)
        self.ca_enter_address_three(colony)
        self.ca_enter_city(city)
        self.ca_enter_postal_code(post_code)

        self.search_for_state()
        sel_state = LookUpStateWindow(self.driver)
        sel_state.select_state(state)
Example #19
0
    def clean_french_address(
            self,
            desc_text="FRANCE",
            sam_type="Corporate Info",
            country_code="FRA",
            address_1="Holiday Inn Paris - Gare de Lyon Bastille",
            address_2="11 Rue de Lyon",
            city="Paris",
            postal="75012",
            department="75"):
        self.clear_element(self._description_field)
        self.ca_enter_description(desc_text)
        self.select_sam_address_type(sam_type)
        self.ca_enter_effective_date()
        self.enter_country_code(country_code)
        self.ca_enter_address_one(address_1)
        self.ca_enter_address_two(address_2)
        self.ca_enter_city(city)
        self.ca_enter_postal(postal)
        self.clear_state_field()  # Clear Department field

        self.search_for_department()
        sel_dept = LookUpStateWindow(self.driver)
        sel_dept.select_state(department)