Beispiel #1
0
    def set_card_holder_info(self, card_holder_info):
        """
        Fill card holder form using the values passed as arguments

        Arguments:
             card_holder_info(dict): card holder info to fill the form.
        """
        self.wait_for_element_visibility(
            '#card-holder-information',
            'wait for card holder info form'
        )
        elements_and_values = {
            '#id_first_name': card_holder_info['first_name'],
            '#id_last_name': card_holder_info['last_name'],
            '#id_address_line1': card_holder_info['address01'],
            '#id_address_line2': card_holder_info['address02'],
            '#id_city': card_holder_info['city'],
            '#id_postal_code': card_holder_info['postal_code'],
            '#bill_to_email': card_holder_info['email']
        }
        fill_input_fields(self, elements_and_values)
        select_value_from_drop_down(
            self,
            "country",
            card_holder_info['country']
        )
        self.wait_for_element_visibility(
            '#id_state',
            'wait for state drop down'
        )
        select_value_from_drop_down(self, "state", card_holder_info['state'])
Beispiel #2
0
 def authenticate_user(self, email, password):
     """
     Provide email and password for an existing user and log in
     Args:
         email
         password
     """
     elements_and_values = {
         '#login-email': email,
         '#login-password': password
     }
     fill_input_fields(self, elements_and_values)
     self.q(css='.action.action-primary.action-update.js-login.login-button'
            ).click()
 def provide_info(self, email, password):
     """
     Fill in login info
     Arguments:
         email(str): User's email
         password(str): User's password
     """
     elements_and_values = {
         '#login-email': email,
         '#login-password': password
     }
     fill_input_fields(self, elements_and_values)
     self.wait_for_ajax()
     self.submit()
Beispiel #4
0
 def authenticate_user(self, email, password):
     """
     Provide email and password for an existing user and log in
     Args:
         email
         password
     """
     elements_and_values = {
         '#login-email': email,
         '#login-password': password
     }
     fill_input_fields(self, elements_and_values)
     self.q(
         css='.action.action-primary.action-update.js-login.login-button'
     ).click()
Beispiel #5
0
    def provide_info(self, email, password):
        """
        Fill in login info

        Arguments:
            email(str): User's email
            password(str): User's password
        """
        elements_and_values = {
            '#login-email': email,
            '#login-password': password
        }
        fill_input_fields(self, elements_and_values)
        self.wait_for_ajax()
        self.submit()