當前位置: 首頁>>代碼示例>>Python>>正文


Python Dialer.callLog_addToContact方法代碼示例

本文整理匯總了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")
開發者ID:owdqa,項目名稱:owd_test_cases,代碼行數:33,代碼來源:test_27014.py

示例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))
開發者ID:owdqa,項目名稱:owd_test_cases,代碼行數:35,代碼來源:test_27021.py


注:本文中的OWDTestToolkit.apps.dialer.Dialer.callLog_addToContact方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。