本文整理汇总了Python中gaiatest.apps.contacts.regions.contact_form.NewContact.type_given_name方法的典型用法代码示例。如果您正苦于以下问题:Python NewContact.type_given_name方法的具体用法?Python NewContact.type_given_name怎么用?Python NewContact.type_given_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.contacts.regions.contact_form.NewContact
的用法示例。
在下文中一共展示了NewContact.type_given_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_sms_create_new_contact
# 需要导入模块: from gaiatest.apps.contacts.regions.contact_form import NewContact [as 别名]
# 或者: from gaiatest.apps.contacts.regions.contact_form.NewContact import type_given_name [as 别名]
def test_sms_create_new_contact(self):
self.contact = MockContact()
self.message_thread = self.messages.tap_first_received_message()
self.message_thread.wait_for_received_messages()
# Check that we received the correct message
self.assertEqual(self.message_thread.header_text, self.testvars['carrier']['phone_number'])
activities = self.message_thread.tap_header()
# Create a new contact
activities.tap_create_new_contact()
# Populate new contact fields
new_contact = NewContact(self.marionette)
new_contact.type_given_name(self.contact['givenName'])
new_contact.type_family_name(self.contact['familyName'])
new_contact.type_email(self.contact['email']['value'])
new_contact.type_street(self.contact['adr']['streetAddress'])
new_contact.type_zip_code(self.contact['adr']['postalCode'])
new_contact.type_city(self.contact['adr']['locality'])
new_contact.type_country(self.contact['adr']['countryName'])
new_contact.type_comment(self.contact['note'])
new_contact.tap_done(return_contacts=False)
self.messages.switch_to_messages_frame()
self.wait_for_condition(lambda m: self.message_thread.header_text == self.contact['name'])
contacts = Contacts(self.marionette)
contacts.launch()
contact_details = contacts.contacts[0].tap()
self.assertEqual(contact_details.phone_numbers[0], self.testvars['carrier']['phone_number'])