本文整理汇总了Python中firefox_ui_harness.testcases.FirefoxTestCase类的典型用法代码示例。如果您正苦于以下问题:Python FirefoxTestCase类的具体用法?Python FirefoxTestCase怎么用?Python FirefoxTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FirefoxTestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDown
def tearDown(self):
try:
self.autocomplete_results.close(force=True)
self.marionette.clear_pref(self.PREF_SUGGEST_SEARCHES)
self.marionette.clear_pref(self.PREF_SUGGEST_BOOKMARK)
finally:
FirefoxTestCase.tearDown(self)
示例2: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
self.test_data = (
{
'url': 'https://ssl-dv.mozqa.com',
'identity': '',
'type': 'secure'
},
{
'url': 'https://ssl-ev.mozqa.com/',
'identity': 'Mozilla Corporation',
'type': 'secure-ev'
},
{
'url': 'https://ssl-ov.mozqa.com/',
'identity': '',
'type': 'secure'
}
)
# Set browser to restore previous session
self.prefs.set_pref('browser.startup.page', 3)
self.locationbar = self.browser.navbar.locationbar
self.identity_popup = self.locationbar.identity_popup
示例3: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
self.prefs.set_pref("extensions.install.requireSecureOrigin", False)
self.addons_url = self.marionette.absolute_url("addons/extensions/")
self.utils.permissions.add(self.marionette.baseurl, "install")
示例4: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
self.locationbar = self.browser.navbar.locationbar
self.identity_popup = self.locationbar.identity_popup
self.url = self.marionette.absolute_url('layout/mozilla.html')
示例5: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
self.url = 'https://ssl-dv.mozqa.com/data/firefox/security/unencryptedsearch.html'
self.test_string = 'mozilla'
self.prefs.set_pref('security.warn_submit_insecure', True)
示例6: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
self.locationbar = self.browser.navbar.locationbar
self.identity_popup = self.locationbar.identity_popup
self.url = 'https://mozqa.com/data/firefox/security/mixedcontent.html'
示例7: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
self.locationbar = self.browser.navbar.locationbar
self.identity_popup = self.browser.navbar.locationbar.identity_popup
self.url = 'https://ssl-dv.mozqa.com'
示例8: tearDown
def tearDown(self):
try:
self.browser.switch_to()
self.identity_popup.close(force=True)
self.windows.close_all([self.browser])
finally:
FirefoxTestCase.tearDown(self)
示例9: tearDown
def tearDown(self, *args, **kwargs):
try:
self._check_and_fix_leaked_rules()
self._check_and_fix_leaked_rules_in_rules_file()
self._check_and_fix_ignoring_errors()
self._check_gecko_log()
finally:
FirefoxTestCase.tearDown(self, *args, **kwargs)
示例10: tearDown
def tearDown(self):
try:
self.utils.permissions.remove('https://www.itisatrap.org', 'safe-browsing')
self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
self.marionette.clear_pref('browser.safebrowsing.malware.enabled')
self.marionette.clear_pref('browser.safebrowsing.phishing.enabled')
finally:
FirefoxTestCase.tearDown(self)
示例11: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
# Use a fake local support URL
support_url = 'about:blank?'
self.prefs.set_pref('app.support.baseURL', support_url)
self.pb_url = support_url + 'private-browsing'
示例12: tearDown
def tearDown(self):
try:
self.utils.permissions.remove(self.addons_url, "install")
if self.browser.notification:
self.browser.notification.close(force=True)
finally:
FirefoxTestCase.tearDown(self)
示例13: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
# Set Browser Preferences
self.marionette.enforce_gecko_prefs(self.browser_prefs)
# Get safebrowsing path where downloaded data gets stored
self.sb_files_path = os.path.join(self.marionette.instance.profile.profile, 'safebrowsing')
示例14: setUp
def setUp(self):
FirefoxTestCase.setUp(self)
self.new_pref = 'marionette.unittest.set_pref'
self.unknown_pref = 'marionette.unittest.unknown'
self.bool_pref = 'browser.tabs.loadBookmarksInBackground'
self.int_pref = 'browser.tabs.maxOpenBeforeWarn'
self.string_pref = 'browser.newtab.url'
示例15: tearDown
def tearDown(self):
try:
self.autocomplete_results.close(force=True)
except NoSuchElementException:
# TODO: A NoSuchElementException is thrown here when tests accessing the
# autocomplete_results element are skipped.
pass
finally:
FirefoxTestCase.tearDown(self)