本文整理匯總了Python中OWDTestToolkit.apps.dialer.Dialer.callLog_createContact方法的典型用法代碼示例。如果您正苦於以下問題:Python Dialer.callLog_createContact方法的具體用法?Python Dialer.callLog_createContact怎麽用?Python Dialer.callLog_createContact使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OWDTestToolkit.apps.dialer.Dialer
的用法示例。
在下文中一共展示了Dialer.callLog_createContact方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_main
# 需要導入模塊: from OWDTestToolkit.apps.dialer import Dialer [as 別名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_createContact [as 別名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.dialer = Dialer(self)
self.contacts = Contacts(self)
self.test_contact = MockContact(tel={'type': 'Mobile', 'value': "665666666"})
# Generate an entry in the call log
self.dialer.launch()
self.dialer.callLog_clearAll()
self.dialer.createMultipleCallLogEntries(self.test_contact["tel"]["value"], 1)
# Create contact with image
self.UTILS.general.add_file_to_device('./tests/_resources/contact_face.jpg')
self.dialer.callLog_createContact(self.test_contact["tel"]["value"])
contFields = self.contacts.get_contact_fields()
self.contacts.replace_str(contFields['givenName'], self.test_contact["givenName"])
self.contacts.replace_str(contFields['familyName'], self.test_contact["familyName"])
self.contacts.add_gallery_image_to_contact(0)
done_button = self.UTILS.element.getElement(DOM.Contacts.done_button, "'Done' button")
done_button.tap()
time.sleep(1)
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.UTILS.general.remove_files()
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.dialer.launch()
self.dialer.open_call_log()
entry = self.UTILS.element.getElement(("xpath",
DOM.Dialer.call_log_number_xpath.format(self.test_contact["tel"]["value"])),
"The call log for number {}".format(self.test_contact["tel"]["value"]))
entry.tap()
self.UTILS.iframe.switchToFrame(*DOM.Dialer.frame_locator_calling)
self.UTILS.element.waitForElements(("xpath", DOM.Dialer.outgoing_call_numberXP.format(self.test_contact["name"])),
"Outgoing call found with number matching {}".format(self.test_contact["name"]))
time.sleep(2)
self.dialer.hangUp()
示例2: test_main
# 需要導入模塊: from OWDTestToolkit.apps.dialer import Dialer [as 別名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_createContact [as 別名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.dialer = Dialer(self)
self.contacts = Contacts(self)
_ = setup_translations(self)
self.contact_1 = MockContact()
self.phone_number = "0034" + self.UTILS.general.get_config_variable("target_call_number", "common")
# Generate an entry in the call log
self.dialer.launch()
self.dialer.callLog_clearAll()
self.dialer.createMultipleCallLogEntries(self.phone_number, 1)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# Open the call log and create a contact for our number.
self.dialer.callLog_createContact(self.phone_number)
contFields = self.contacts.get_contact_fields()
self.contacts.replace_str(contFields['givenName'], self.contact_1["givenName"])
self.contacts.replace_str(contFields['familyName'], self.contact_1["familyName"])
done_button = self.UTILS.element.getElement(DOM.Contacts.done_button, "'Done' button")
done_button.tap()
# Verify that the contacts app is closed and we are returned to the call log.
self.marionette.switch_to_frame()
self.UTILS.element.waitForNotElements(("xpath", "//iframe[contains(@{}, '{}')]".
format(DOM.Contacts.frame_locator[0], DOM.Contacts.frame_locator[1])),
"Contacts frame")
self.UTILS.iframe.switchToFrame(*DOM.Dialer.frame_locator)
header = ('xpath', DOM.GLOBAL.app_head_specific.format(_("Call log")))
self.UTILS.element.waitForElements(header, "Call log header")
# Verify that this contact has been created in contacts.
self.apps.kill_all()
self.contacts.launch()
self.contacts.view_contact(self.contact_1["name"])
示例3: test_main
# 需要導入模塊: from OWDTestToolkit.apps.dialer import Dialer [as 別名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_createContact [as 別名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.dialer = Dialer(self)
self.contacts = Contacts(self)
_ = setup_translations(self)
self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
self.test_contact = MockContact()
self.dialer.launch()
self.dialer.callLog_clearAll()
self.dialer.createMultipleCallLogEntries(self.phone_number, 1)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.dialer.callLog_createContact(self.phone_number)
contFields = self.contacts.get_contact_fields()
self.contacts.replace_str(contFields['givenName'], self.test_contact["givenName"])
self.contacts.replace_str(contFields['familyName'], self.test_contact["familyName"])
done_button = self.UTILS.element.getElement(DOM.Contacts.done_button, "'Done' button")
done_button.tap()
# Verify that the contacts app is closed and we are returned to the call log.
self.marionette.switch_to_frame()
self.UTILS.element.waitForNotElements(("xpath", "//iframe[contains(@{}, '{}')]".
format(DOM.Contacts.frame_locator[0], DOM.Contacts.frame_locator[1])),
"Contacts frame")
self.UTILS.iframe.switchToFrame(*DOM.Dialer.frame_locator)
header = ('xpath', DOM.GLOBAL.app_head_specific.format(_("Call log")))
self.UTILS.element.waitForElements(header, "Call log header")
# Verify that the call log now shows the contact name,
x = self.UTILS.element.getElement(("xpath", DOM.Dialer.call_log_number_xpath.format(self.phone_number)),
"The call log for phone_number {}".format(self.phone_number))
self.UTILS.test.test(self.test_contact["name"] in x.text, "Call log now shows '{}'.".
format(self.test_contact["name"]))