本文整理汇总了Python中OWDTestToolkit.apps.dialer.Dialer.callLog_clearAll方法的典型用法代码示例。如果您正苦于以下问题:Python Dialer.callLog_clearAll方法的具体用法?Python Dialer.callLog_clearAll怎么用?Python Dialer.callLog_clearAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWDTestToolkit.apps.dialer.Dialer
的用法示例。
在下文中一共展示了Dialer.callLog_clearAll方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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))
示例2: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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")
示例3: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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 (...)")
示例4: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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()
示例5: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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.contact_1 = MockContact()
self.phone_number = "0034" + self.UTILS.general.get_config_variable("target_call_number", "common")
# 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 create a contact for our number.
self.dialer.callLog_createContact(self.phone_number)
contFields = self.contacts.get_contact_fields()
self.contacts.replace_str(contFields['givenName'], self.contact_1["givenName"])
self.contacts.replace_str(contFields['familyName'], self.contact_1["familyName"])
done_button = self.UTILS.element.getElement(DOM.Contacts.done_button, "'Done' button")
done_button.tap()
# Verify that the contacts app is closed and we are returned to the call log.
self.marionette.switch_to_frame()
self.UTILS.element.waitForNotElements(("xpath", "//iframe[contains(@{}, '{}')]".
format(DOM.Contacts.frame_locator[0], DOM.Contacts.frame_locator[1])),
"Contacts frame")
self.UTILS.iframe.switchToFrame(*DOM.Dialer.frame_locator)
header = ('xpath', DOM.GLOBAL.app_head_specific.format(_("Call log")))
self.UTILS.element.waitForElements(header, "Call log header")
# Verify that this contact has been created in contacts.
self.apps.kill_all()
self.contacts.launch()
self.contacts.view_contact(self.contact_1["name"])
示例6: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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.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.callLog_createContact(self.phone_number)
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"])
done_button = self.UTILS.element.getElement(DOM.Contacts.done_button, "'Done' button")
done_button.tap()
# Verify that the contacts app is closed and we are returned to the call log.
self.marionette.switch_to_frame()
self.UTILS.element.waitForNotElements(("xpath", "//iframe[contains(@{}, '{}')]".
format(DOM.Contacts.frame_locator[0], DOM.Contacts.frame_locator[1])),
"Contacts frame")
self.UTILS.iframe.switchToFrame(*DOM.Dialer.frame_locator)
header = ('xpath', DOM.GLOBAL.app_head_specific.format(_("Call log")))
self.UTILS.element.waitForElements(header, "Call log header")
# Verify that the call log now shows the contact name,
x = self.UTILS.element.getElement(("xpath", DOM.Dialer.call_log_number_xpath.format(self.phone_number)),
"The call log for phone_number {}".format(self.phone_number))
self.UTILS.test.test(self.test_contact["name"] in x.text, "Call log now shows '{}'.".
format(self.test_contact["name"]))
示例7: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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("phone_number", "custom")
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.dialer.launch()
self.dialer.createMultipleCallLogEntries(self.phone_number, 4)
self.dialer.callLog_clearAll()
示例8: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.contacts = Contacts(self)
self.dialer = Dialer(self)
self.test_contacts = [MockContact() for i in range(3)]
self.test_numbers = [self.test_contacts[i]["tel"]["value"] for i in range(len(self.test_contacts))]
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def _do_the_call(self, number):
self.dialer.enterNumber(number, validate=False)
self.dialer.call_this_number_and_hangup(5)
def test_run(self):
self.dialer.launch()
# Delete all call log
self.dialer.callLog_clearAll()
# Call each number
map(self._do_the_call, self.test_numbers)
self.dialer.callLog_clearAll()
# Go back to dialer keypad
keypad_options = self.UTILS.element.getElement(DOM.Dialer.option_bar_keypad, "Keypad Option")
keypad_options.tap()
# Tap call button
call_button = self.UTILS.element.getElement(DOM.Dialer.call_number_button, "Call button")
call_button.tap()
# Assert that nothing is presented in the input area
phone_field = self.UTILS.element.getElement(DOM.Dialer.phone_number, "Phone number field")
dialer_num = phone_field.get_attribute("value")
self.assertEqual(dialer_num, "", "Nothing in the input area")
screenshot = self.UTILS.debug.screenShotOnErr()
self.UTILS.reporting.logResult("info", "Screen shot of the result of tapping call button", screenshot)
示例9: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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)
示例10: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.contacts = Contacts(self)
self.dialer = Dialer(self)
# Get details of our test contacts.
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 for this contact
self.dialer.launch()
self.dialer.callLog_clearAll()
self.dialer.createMultipleCallLogEntries(self.phone_number, 2)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
kepad_option = self.UTILS.element.getElement(DOM.Dialer.option_bar_keypad, "Keypad Option")
kepad_option.tap()
call_btn = self.UTILS.element.getElement(DOM.Dialer.call_number_button, "Call button")
call_btn.tap()
# Make sure that after tapping, we get the last outgoing call in the call log
phone_field = self.UTILS.element.getElement(DOM.Dialer.phone_number, "Phone number field", False)
dialer_num = phone_field.get_attribute("value")
self.UTILS.test.test(self.test_contact["tel"]["value"] in dialer_num,
"After calling '{}', and tapping call button, phone number field contains '{}'.".
format(self.test_contact["tel"]["value"], dialer_num))
y = self.UTILS.debug.screenShotOnErr()
self.UTILS.reporting.logResult("info", "Screen shot of the result of tapping call button", y)
示例11: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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)
示例12: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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.")
示例13: test_main
# 需要导入模块: from OWDTestToolkit.apps.dialer import Dialer [as 别名]
# 或者: from OWDTestToolkit.apps.dialer.Dialer import callLog_clearAll [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()