本文整理汇总了Python中OWDTestToolkit.apps.dialer.Dialer.createContactFromThisNum方法的典型用法代码示例。如果您正苦于以下问题:Python Dialer.createContactFromThisNum方法的具体用法?Python Dialer.createContactFromThisNum怎么用?Python Dialer.createContactFromThisNum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWDTestToolkit.apps.dialer.Dialer
的用法示例。
在下文中一共展示了Dialer.createContactFromThisNum方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import createContactFromThisNum [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.given_name = "John"
self.family_name = "Doe"
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.dialer.launch()
self.dialer.enterNumber("123456789")
self.dialer.createContactFromThisNum()
contFields = self.contacts.get_contact_fields()
self.contacts.replace_str(contFields['givenName'], self.given_name)
self.contacts.replace_str(contFields['familyName'], self.family_name)
done_button = self.UTILS.element.getElement(DOM.Contacts.done_button, "Done button")
done_button.tap()
time.sleep(2)
self.UTILS.reporting.logResult('info', "displayed_app: {}".format(self.apps.displayed_app.name))
self.UTILS.test.test(self.apps.displayed_app.name == "Phone", "The dialer app is now displayed.")
示例2: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import createContactFromThisNum [as 别名]
class test_main(GaiaTestCase):
test_num = "089123456"
test_msg = "Testing " + test_num + " number."
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.messages = Messages(self)
self.Dialer = Dialer(self)
self.contacts = Contacts(self)
# Establish which phone number to use.
self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
self.cp_incoming_number = self.UTILS.general.get_config_variable("sms_platform_numbers", "common").split(',')
self.UTILS.reporting.logComment("Sending sms to telephone number " + self.phone_number)
self.data_layer.delete_all_sms()
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.connect_to_network()
self.UTILS.statusbar.clearAllStatusBarNotifs()
# Launch messages app.
self.messages.launch()
self.UTILS.messages.create_incoming_sms(self.phone_number, self.test_msg)
self.UTILS.statusbar.wait_for_notification_toaster_detail(self.test_msg, timeout=120)
title = self.UTILS.statusbar.wait_for_notification_toaster_with_titles(self.cp_incoming_number, timeout=5)
self.UTILS.statusbar.click_on_notification_title(title, DOM.Messages.frame_locator)
last_msg = self.messages.last_message_in_this_thread()
num = last_msg.find_element("tag name", "a")
num.tap()
call_btn = self.UTILS.element.getElement(DOM.Messages.header_call_btn, "Call button")
call_btn.tap()
time.sleep(5)
# Create a contact from this number.
self.Dialer.createContactFromThisNum()
# Make sure the number is automatically in the contact details.
number_field = self.UTILS.element.getElement(("id", "number_0"), "Mobile number field")
self.UTILS.test.test(number_field.get_attribute("value") == self.test_num,
"The correct number is automatically entered in the new contact's number field.")
示例3: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import createContactFromThisNum [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.dialer = Dialer(self)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.dialer.launch()
self.dialer.enterNumber("123456789")
self.dialer.createContactFromThisNum()