本文整理汇总了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"]))