本文整理汇总了Python中OWDTestToolkit.apps.loop.Loop.logout方法的典型用法代码示例。如果您正苦于以下问题:Python Loop.logout方法的具体用法?Python Loop.logout怎么用?Python Loop.logout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWDTestToolkit.apps.loop.Loop
的用法示例。
在下文中一共展示了Loop.logout方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.connect_to_network()
self.loop.initial_test_checks()
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# First, login
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.phone_login()
self.loop.allow_permission_phone_login()
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
time.sleep(5)
self.loop.open_settings()
self.loop.logout()
# The user is not logged in, so no ID is available. The screen to authenticate
# is shown instead
phone_btn = self.marionette.find_element(*DOM.Loop.wizard_login_phone_number)
self.UTILS.test.test(phone_btn, "Use phone number login button is present")
示例2: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.settings = Settings(self)
self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")
self.fxa_user2 = self.UTILS.general.get_config_variable("fxa_user2", "common")
self.fxa_pass2 = self.UTILS.general.get_config_variable("fxa_pass2", "common")
self.connect_to_network()
self.loop.initial_test_checks()
self.logout_fxa()
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.logout_fxa()
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# First, login
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.firefox_login(self.fxa_user2, self.fxa_pass2)
self.loop.allow_permission_ffox_login()
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
time.sleep(5)
self.loop.open_settings()
self.loop.logout()
self.logout_fxa()
self.apps.kill_all()
time.sleep(2)
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.firefox_login(self.fxa_user, self.fxa_pass)
self.UTILS.iframe.switch_to_frame(*DOM.Loop.frame_locator)
self.loop.open_settings()
login_info_elem = self.UTILS.element.getElement(DOM.Loop.settings_logged_as, "Login info")
login_info = login_info_elem.text.split("\n")[-1]
self.UTILS.test.test(login_info == self.fxa_user, "Login info matches [FxA]")
def logout_fxa(self):
self.settings.launch()
self.settings.fxa()
self.settings.fxa_log_out()
示例3: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.settings = Settings(self)
self.fxa_user_1 = self.UTILS.general.get_config_variable("fxa_user", "common")
self.fxa_pass_1 = self.UTILS.general.get_config_variable("fxa_pass", "common")
self.connect_to_network()
self.loop.initial_test_checks()
self.settings.launch()
self.settings.fxa()
if self.settings.is_fxa_logged_in():
self.settings.fxa_log_out()
self.settings.fxa_log_in(self.fxa_user_1, self.fxa_pass_1)
self.apps.kill_all()
time.sleep(2)
# First, login with the first fxa
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.tap_on_firefox_login_button()
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
self.loop.open_settings()
self.loop.logout()
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# Now logout of FxA via settings
self.settings.launch()
self.settings.fxa()
self.settings.fxa_log_out()
self.apps.kill_all()
time.sleep(2)
# And try to login in Loop
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.tap_on_firefox_login_button()
self.UTILS.iframe.switchToFrame(*DOM.Loop.ffox_account_frame_locator)
self.UTILS.element.waitForElements(DOM.Loop.ffox_account_login_title, "Firefox Accounts login")
示例4: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.contacts = Contacts(self)
self.settings = Settings(self)
self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")
self.connect_to_network()
self.target_name = "QA"
self.test_contacts = [MockContact() for i in range(5)]
self.test_contacts[0]["givenName"] = self.target_name
self.test_contacts[0]["familyName"] = "Automation"
map(self.UTILS.general.insertContact, self.test_contacts)
# Clean start
if not self.loop.is_installed():
self.loop.install()
else:
self.loop.launch()
# If already logged in, logout
if not self.loop.wizard_or_login():
self.loop.open_settings()
self.loop.logout()
self.settings.launch()
self.settings.fxa()
self.settings.fxa_log_out()
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# First, login
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.firefox_login(self.fxa_user, self.fxa_pass)
self.loop.allow_permission_ffox_login()
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
self.loop.open_address_book()
self.contacts.search(self.target_name)
self.contacts.check_search_results(self.target_name)
示例5: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.settings = Settings(self)
self.test_contact = MockContact()
self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")
self.connect_to_network()
self.UTILS.general.insertContact(self.test_contact)
# Clean start
if not self.loop.is_installed():
self.loop.install()
else:
self.loop.launch()
# If already logged in, logout
if not self.loop.wizard_or_login():
self.loop.open_settings()
self.loop.logout()
self.settings.launch()
self.settings.fxa()
self.settings.fxa_log_out()
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# First, login
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.firefox_login(self.fxa_user, self.fxa_pass)
self.loop.allow_permission_ffox_login()
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
self.loop.open_address_book()
elem = (DOM.Contacts.view_all_contact_specific_contact[
0], DOM.Contacts.view_all_contact_specific_contact[1].format(self.test_contact["givenName"]))
entry = self.UTILS.element.getElement(elem, "Contact in address book")
entry.tap()
self.UTILS.iframe.switch_to_active_frame()
elem = (DOM.Loop.call_screen_contact_details[0], DOM.Loop.call_screen_contact_details[1].format(self.test_contact["name"]))
self.UTILS.element.waitForElements(elem, "Call to contact: {}".format(self.test_contact["name"]))
示例6: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.settings = Settings(self)
self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")
self.connect_to_network()
self.loop.initial_test_checks()
self.settings.launch()
self.settings.fxa()
if self.settings.is_fxa_logged_in():
self.settings.fxa_log_out()
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# First, login
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.firefox_login(self.fxa_user, self.fxa_pass)
self.loop.allow_permission_ffox_login()
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
# Now logout
self.loop.open_settings()
self.loop.logout()
self.apps.kill_all()
time.sleep(2)
# Now check for login to be prompted
self.loop.launch()
self.loop.wizard_or_login()
self.UTILS.element.waitForElements(DOM.Loop.wizard_login, "Login options prompted")
示例7: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.settings = Settings(self)
self.connect_to_network()
self.loop.initial_test_checks()
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# First, login
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.phone_login()
self.loop.allow_permission_phone_login()
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
# Logout, login, and check permissio overlay is not shown ever ever again
self.loop.open_settings()
self.loop.logout()
self.apps.kill_all()
time.sleep(2)
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.phone_login()
self.UTILS.element.waitForNotElements(DOM.GLOBAL.app_permission_dialog, "Permission dialog", timeout=10)
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view", timeout=10)
示例8: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.settings = Settings(self)
self.connect_to_network()
self.loop.initial_test_checks()
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# First, login
self.loop.launch()
result = self.loop.wizard_or_login()
if result:
self.loop.phone_login()
self.loop.allow_permission_phone_login()
self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
# Now logout
self.loop.open_settings()
self.loop.logout()
self.apps.kill_all()
time.sleep(2)
# Now check for login to be prompted
self.loop.launch()
self.loop.wizard_or_login()
self.UTILS.element.waitForElements(DOM.Loop.wizard_login, "Login options prompted")
示例9: main
# 需要导入模块: from OWDTestToolkit.apps.loop import Loop [as 别名]
# 或者: from OWDTestToolkit.apps.loop.Loop import logout [as 别名]
class main(GaiaTestCase):
def setUp(self):
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.loop = Loop(self)
self.settings = Settings(self)
self.fxa_user = self.UTILS.general.get_os_variable("GLOBAL_FXA_USER")
self.fxa_pass = self.UTILS.general.get_os_variable("GLOBAL_FXA_PASS")
self.data_layer.connect_to_cell_data()
self.settings.launch()
self.settings.fxa()
self.settings.fxa_log_out()
self.apps.kill_all()
time.sleep(2)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# First, login
self.loop.launch()
self.loop.wizard_or_login()
self.loop.firefox_login(self.fxa_user, self.fxa_pass)
self.loop.allow_permission_ffox_login()
header = ('xpath', DOM.GLOBAL.app_head_specific.format("Firefox Hello"))
self.UTILS.element.waitForElements(header, "Loop main view")
# Now logout
self.loop.open_settings()
self.loop.logout()
self.UTILS.element.waitForElements(DOM.Loop.wizard_login, "Login options prompted")