本文整理汇总了Python中OWDTestToolkit.apps.dialer.Dialer.callLog_addToContact方法的典型用法代码示例。如果您正苦于以下问题:Python Dialer.callLog_addToContact方法的具体用法?Python Dialer.callLog_addToContact怎么用?Python Dialer.callLog_addToContact使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWDTestToolkit.apps.dialer.Dialer
的用法示例。
在下文中一共展示了Dialer.callLog_addToContact方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_addToContact [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.UTILS.general.insertContact(self.test_contact)
# 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 add to our contact, cancelling the process
self.dialer.callLog_addToContact(self.phone_number, self.test_contact["name"], cancel_process=True)
# Check we're back in the call log.
self.UTILS.iframe.switchToFrame(*DOM.Dialer.frame_locator)
call_info_header = self.UTILS.element.getElement(DOM.Dialer.call_info_title, "Call info header")
self.UTILS.test.test(call_info_header.text == self.phone_number, "We are back to call info screen")
示例2: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_addToContact [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.dialer = Dialer(self)
self.contacts = Contacts(self)
self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
self.phone_number2 = self.UTILS.general.get_config_variable("short_phone_number", "custom")
self.test_contact = MockContact(tel={'type': 'Mobile', 'value': self.phone_number2})
self.UTILS.general.insertContact(self.test_contact)
# 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 add to our contact.
self.dialer.callLog_addToContact(self.phone_number, self.test_contact["name"])
# Verify that this contact has been modified in contacts.
self.contacts.launch()
self.contacts.view_contact(self.test_contact["name"])
self.UTILS.element.waitForElements(("xpath", DOM.Contacts.view_contact_tels_xpath.format(self.phone_number)),
"Telephone number {} in contact".format(self.phone_number))