Well, thatβs logical: it **credentials
means that you provide it with arguments. But you did not specify the name of the dictionary.
There are two possibilities here:
you use it credentials
as one argument and pass it a dictionary, for example:
def submit_new_account_form(self, credentials):
pass
loginpage.submit_new_account_form({'first_name': 'Test', 'last_name': 'Test', 'phone_or_email': temp_email, 'newpass': '1q2w3e4r5t', 'sex': 'male'})
you pass the dictionary as named arguments by setting two stars in front of you:
def submit_new_account_form(self, **credentials):
pass
loginpage.submit_new_account_form(**{'first_name': 'Test', 'last_name': 'Test', 'phone_or_email': temp_email, 'newpass': '1q2w3e4r5t', 'sex': 'male'})
The second approach is equal to passing named arguments of the type:
loginpage.submit_new_account_form(first_name='Test', last_name='Test', phone_or_email=temp_email, newpass='1q2w3e4r5t', sex='male')
, . , submit_new_account_form
, , , .