本文整理汇总了Python中gaiatest.apps.contacts.regions.contact_form.NewContact类的典型用法代码示例。如果您正苦于以下问题:Python NewContact类的具体用法?Python NewContact怎么用?Python NewContact使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NewContact类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tap_create_new_contact
def tap_create_new_contact(self):
self.marionette.find_element(*self._create_new_contact_button_locator).tap()
from gaiatest.apps.contacts.regions.contact_form import NewContact
new_contact = NewContact(self.marionette)
new_contact.switch_to_new_contact_form()
return new_contact
示例2: a11y_click_new_contact
def a11y_click_new_contact(self):
self.accessibility.click(self.marionette.find_element(*self._new_contact_button_locator))
from gaiatest.apps.contacts.regions.contact_form import NewContact
new_contact = NewContact(self.marionette)
new_contact.wait_for_new_contact_form_to_load()
return new_contact
示例3: tap_new_contact
def tap_new_contact(self):
self.marionette.find_element(*self._new_contact_button_locator).tap()
from gaiatest.apps.contacts.regions.contact_form import NewContact
new_contact = NewContact(self.marionette)
new_contact.wait_for_new_contact_form_to_load()
return new_contact
示例4: tap_create_new_contact
def tap_create_new_contact(self):
create_new_contact = self.marionette.find_element(*self._create_new_contact_locator)
Wait(self.marionette).until(expected.element_displayed(create_new_contact))
create_new_contact.tap()
from gaiatest.apps.contacts.regions.contact_form import NewContact
new_contact = NewContact(self.marionette)
new_contact.switch_to_new_contact_form()
return new_contact
示例5: test_sms_create_new_contact
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'])