本文整理匯總了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))