本文整理汇总了Python中OWDTestToolkit.apps.dialer.Dialer.open_call_log方法的典型用法代码示例。如果您正苦于以下问题:Python Dialer.open_call_log方法的具体用法?Python Dialer.open_call_log怎么用?Python Dialer.open_call_log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWDTestToolkit.apps.dialer.Dialer
的用法示例。
在下文中一共展示了Dialer.open_call_log方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import open_call_log [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 open_call_log [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.dialer = Dialer(self)
self.test_num = ["666666666666", "555555555555"]
self.test_contacts = [MockContact(tel={'type': 'Mobile',
'value': self.test_num[i]}) for i in range(2)]
self.test_contacts[0]["givenName"] = "LongGivennamexxxxxxxxxxx"
self.test_contacts[1]["familyName"] = "LongFamilynamexxxxxxxxxxx"
"""
This has to be done due to a MockContact malfunction. It does not
update the name field to the specified values of givenName and familyName
"""
for c in self.test_contacts:
c["name"] = c["givenName"] + " " + c["familyName"]
map(self.UTILS.general.insertContact, self.test_contacts)
self.dialer.launch()
self.dialer.callLog_clearAll()
for contact in self.test_contacts:
self.dialer.createMultipleCallLogEntries(contact["tel"]["value"], 2)
self.dialer.open_call_log()
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
entries = self.UTILS.element.getElements(DOM.Dialer.call_log_numbers, "Call log entries", False)
self.UTILS.reporting.logResult("info", "{} entries found.".format(len(entries)))
for entry in entries:
item = entry.find_element("xpath", "//span[@class='primary-info-main']")
value = self.UTILS.element.get_css_value(item, "text-overflow")
isEllipsis = self.UTILS.element.is_ellipsis_active(item)
self.UTILS.reporting.logResult("info", "Value of css property: {}".format(value))
self.UTILS.reporting.logResult("info", "isEllipsisActive? {}".format(isEllipsis))
self.UTILS.test.test(
value == "ellipsis" and isEllipsis, "Long entry in call log displays the ellipsis (...)")
示例3: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import open_call_log [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)
num = self.UTILS.general.get_config_variable("phone_number", "custom")
self.test_contact = MockContact(tel={'type': 'Mobile', 'value': num})
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.dialer.launch()
self.dialer.callLog_clearAll()
self.dialer.createMultipleCallLogEntries(self.test_contact["tel"]["value"], 1)
self.dialer.open_call_log()
_number_el = DOM.Dialer.call_log_number_xpath.format(self.test_contact["tel"]["value"])
elem = ('xpath', _number_el)
self.UTILS.element.waitForElements(elem,
"The number {} in the call log".format(self.test_contact["tel"]["value"]))
self.UTILS.element.waitForNotElements(("xpath", "{}//*[text()='{}']".
format(_number_el, self.test_contact["name"])),
"The name {} in the call log".format(self.test_contact["name"]))
screenshot = self.UTILS.debug.screenShotOnErr()
self.UTILS.reporting.logResult(
"info", "Call log <i>before</i> adding contact details for this number:", screenshot)
self.contacts.launch()
self.contacts.create_contact(self.test_contact)
self.dialer.launch()
self.dialer.open_call_log()
self.UTILS.element.waitForElements(("xpath", DOM.Dialer.call_log_name_xpath.format(self.test_contact["name"])),
"The name {} in the call log".format(self.test_contact["name"]))
x = self.UTILS.debug.screenShotOnErr()
self.UTILS.reporting.logResult("info", "Call log <i>after</i> adding contact details for this number:", x)
示例4: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import open_call_log [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.dialer = Dialer(self)
_ = setup_translations(self)
self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
# Fill the call log with some entries
self.dialer.launch()
self.dialer.createMultipleCallLogEntries(self.phone_number, 1)
self.data_layer.set_setting("airplaneMode.enabled", True)
self.wait_for_condition(lambda m: self.data_layer.get_setting("airplaneMode.enabled"),
timeout=30, message="No airplane mode enabled")
def tearDown(self):
self.data_layer.set_setting("airplaneMode.enabled", False)
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.dialer.open_call_log()
elem = ("xpath", DOM.Dialer.call_log_number_xpath.format(self.phone_number))
entry = self.UTILS.element.getElement(elem, "The call log for number {}".format(self.phone_number))
entry.tap()
warning_header = (DOM.GLOBAL.confirmation_msg_header[0],
DOM.GLOBAL.confirmation_msg_header[1].format(_("Airplane mode activated")))
_content = _("To make a call you need to disable airplane mode in settings.")
warning_content = (DOM.GLOBAL.confirmation_msg_content[0],
DOM.GLOBAL.confirmation_msg_content[1].format(_content))
self.UTILS.element.getElement(warning_header, "Airplane mode warning [header]")
self.UTILS.element.getElement(warning_content, "Airplane mode warning [content]")
ok_btn = self.UTILS.element.getElement(DOM.GLOBAL.confirmation_msg_ok_btn, "OK button")
ok_btn.tap()
self.UTILS.element.waitForElements(DOM.Dialer.call_log_filter, "Call log filter")
示例5: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import open_call_log [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.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
self.test_contact = MockContact(tel={'type': 'Mobile', 'value': self.phone_number})
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):
self.dialer.open_call_log()
self.dialer.callLog_long_tap(self.test_contact["tel"]["value"])
call_info = self.UTILS.element.getElement(DOM.Dialer.call_log_numtap_call_info, "Call information button")
call_info.tap()
call_info_header = self.UTILS.element.getElement(DOM.Dialer.call_info_title, "Call info title")
self.UTILS.test.test(call_info_header.text == self.test_contact['name'], 'Header title matches with contact')
go_to_contact_details_button = self.UTILS.element.getElement(DOM.Dialer.call_info_contact_go_to_contact_details, "Go to contact detail")
self.UTILS.element.waitForElements(("xpath", "//button[contains(@class,'remark') and @data-tel='{}']".\
format(self.test_contact["tel"]["value"])), "Highlighted number")
screenshot = self.UTILS.debug.screenShotOnErr()
self.UTILS.reporting.logResult("info", "Final screenshot:", screenshot)
示例6: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import open_call_log [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)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.dialer.launch()
self.dialer.callLog_clearAll()
self.dialer.open_call_log()
x = self.UTILS.element.getElement(DOM.Dialer.call_log_edit_btn, "Edit button", False)
#Try with attribute aria-disabled
self.UTILS.test.test(x.get_attribute("aria-disabled"), "The edit button is disabled.")
示例7: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import open_call_log [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.dialer = Dialer(self)
self.phone_number = self.UTILS.general.get_config_variable("target_call_number", "common")
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 tap on the phone_number.
self.dialer.open_call_log()
self.dialer.callLog_call(self.phone_number)
time.sleep(3)
self.dialer.hangUp()