def __autofill_form_data(self, form_data, elements):
        """Autofill empty form data with random data.

        Args:
            form_data (obj): The {key: value} form data
            elements list(obj): Soup elements.

        Returns:
            obj: The {key: value}

        """

        for element in elements:
            if not element["name"] in form_data:
                continue

            if not len(form_data[element["name"]]) is 0:
                continue

            if element.name == "textarea":
                form_data[element["name"]] = RandomInputHelper.get_for_type("textarea")
                continue

            if element.has_attr("type"):
                form_data[element["name"]] = RandomInputHelper.get_for_type(element["type"])
def __autofill_form_data ( self , form_data , elements ) : for element in elements : if not element [ "name" ] in form_data : continue if not len ( form_data [ element [ "name" ] ] ) is 0 : continue if element . name == "textarea" : form_data [ element [ "name" ] ] = RandomInputHelper . get_for_type ( "textarea" ) continue if element . has_attr ( "type" ) : form_data [ element [ "name" ] ] = RandomInputHelper . get_for_type ( element [ "type" ] )
Autofill empty form data with random data.

        Args:
            form_data (obj): The {key: value} form data
            elements list(obj): Soup elements.

        Returns:
            obj: The {key: value}