• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python marionette_test.MarionetteTestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中marionette_test.MarionetteTestCase的典型用法代码示例。如果您正苦于以下问题:Python MarionetteTestCase类的具体用法?Python MarionetteTestCase怎么用?Python MarionetteTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了MarionetteTestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
     self.win = self.marionette.current_window_handle
     self.marionette.execute_script(
         "window.open('chrome://marionette/content/test.xul', '_blank', 'chrome,centerscreen');"
     )
开发者ID:lovecigarettes,项目名称:ExMail,代码行数:7,代码来源:test_text.py


示例2: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
     self.win = self.marionette.current_window_handle
     self.marionette.execute_script("window.open('chrome://marionette/content/test.xul', 'foo', 'chrome,centerscreen');")
     self.marionette.switch_to_window('foo')
     self.assertNotEqual(self.win, self.marionette.current_window_handle)
开发者ID:AshishNamdev,项目名称:mozilla-central,代码行数:7,代码来源:test_text.py


示例3: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     if self.marionette.session_capabilities['platformName'] == 'DARWIN':
         self.mod_key = Keys.META
     else:
         self.mod_key = Keys.CONTROL
     self.action = Actions(self.marionette)
开发者ID:html-shell,项目名称:mozbuild,代码行数:7,代码来源:test_click.py


示例4: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.linter = Linter(
         ResourceUriFileReader(self.marionette),
         JSHintEngine(self.marionette,
                      self._read_local_file(self.JSHINT_PATH),
                      self._read_local_file(self.JSHINTRC_PATH)),
         self._get_extended_error_message)
开发者ID:lisayao,项目名称:mozilla-central-httpse-tests,代码行数:8,代码来源:test_ril_code_quality.py


示例5: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     test_url = self.marionette.absolute_url('test.html')
     self.marionette.navigate(test_url)
     self.COOKIE_A = {"name": "foo",
                      "value": "bar",
                      "path": "/",
                      "secure": False}
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:8,代码来源:test_cookies.py


示例6: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
     self.win = self.marionette.get_window()
     #need to get the file:// path for xul
     unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
     tests = os.path.abspath(os.path.join(unit, os.path.pardir))
     mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
     xul = "file://" + os.path.join(mpath, "www", "test.xul")
     self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
开发者ID:mozilla,项目名称:pjs,代码行数:10,代码来源:test_click.py


示例7: setUp

    def setUp(self):
        MarionetteTestCase.setUp(self)

        # shortcuts to improve readability of these tests
        self.chrome = self.marionette.CONTEXT_CHROME
        self.content = self.marionette.CONTEXT_CONTENT

        test_url = self.marionette.absolute_url('empty.html')
        self.marionette.navigate(test_url)
        self.marionette.set_context(self.content)
        self.assertEquals(self.get_context(), self.content)
开发者ID:marshall,项目名称:gecko-dev,代码行数:11,代码来源:test_with_using_context.py


示例8: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     if self.marionette.session_capabilities['platformName'] == 'DARWIN':
         self.mod_key = Keys.META
     else:
         self.mod_key = Keys.CONTROL
     test_html = self.marionette.absolute_url("javascriptPage.html")
     self.marionette.navigate(test_html)
     self.reporter_element = self.marionette.find_element("id", "keyReporter")
     self.reporter_element.click()
     self.key_action = Actions(self.marionette)
开发者ID:stormandsun,项目名称:firefox,代码行数:11,代码来源:test_key_actions.py


示例9: setUp

    def setUp(self):
        # start server
        self.loop_test_servers = LoopTestServers()

        MarionetteTestCase.setUp(self)

        # Unfortunately, enforcing preferences currently comes with the side
        # effect of launching and restarting the browser before running the
        # real functional tests.  Bug 1048554 has been filed to track this.
        self.marionette.enforce_gecko_prefs(FIREFOX_PREFERENCES)

        # this is browser chrome, kids, not the content window just yet
        self.marionette.set_context("chrome")
开发者ID:KershawChang,项目名称:gecko-dev,代码行数:13,代码来源:test_1_browser_call.py


示例10: setUp

    def setUp(self):
        # start server
        self.loop_test_servers = LoopTestServers()

        MarionetteTestCase.setUp(self)

        # Unfortunately, enforcing preferences currently comes with the side
        # effect of launching and restarting the browser before running the
        # real functional tests.  Bug 1048554 has been filed to track this.
        preferences = {"loop.server": "http://localhost:" + str(LOOP_SERVER_PORT)}
        self.marionette.enforce_gecko_prefs(preferences)

        # this is browser chrome, kids, not the content window just yet
        self.marionette.set_context("chrome")
开发者ID:andrenatal,项目名称:gecko-dev,代码行数:14,代码来源:test_get_url.py


示例11: __init__

    def __init__(self, marionette_weakref, **kwargs):
        if 'runner' in kwargs:
            self.runner = kwargs['runner']
            del kwargs['runner']

        update_test_js = os.path.join(os.path.dirname(__file__), 'atoms',
                                      'b2g_update_test.js')
        with open(update_test_js, 'r') as f:
            self.update_test_js = f.read()

        self.b2g_pid = self.runner.find_b2g_pid()
        if not self.b2g_pid:
            raise Exception('B2G PID could not be found for update test')
        MarionetteTestCase.__init__(self, marionette_weakref, **kwargs)

        self.testvars = self.testvars or {}
        self.status_newline = True
        self.loglines = []
开发者ID:,项目名称:,代码行数:18,代码来源:


示例12: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
开发者ID:tpb261,项目名称:marionette_client,代码行数:3,代码来源:test_log.py


示例13: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
开发者ID:html-shell,项目名称:mozbuild,代码行数:2,代码来源:test_import_script.py


示例14: tearDown

 def tearDown(self):
     #ensure that we close the window, regardless of pass/failure
     self.close_new_window()
     MarionetteTestCase.tearDown(self)
开发者ID:,项目名称:,代码行数:4,代码来源:


示例15: setUp

    def setUp(self):
        MarionetteTestCase.setUp(self)

        self.screen = self.marionette.emulator.screen
        self.screen.initialize()
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:5,代码来源:test_emulator.py


示例16: tearDown

 def tearDown(self):
     self.marionette.delete_all_cookies()
     MarionetteTestCase.tearDown(self)
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:3,代码来源:test_cookies.py


示例17: setUp

 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.enforce_gecko_prefs({"marionette.test.bool": True, "marionette.test.string": "testing", "marionette.test.int": 3})
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:3,代码来源:test_profile_management.py


示例18: tearDown

 def tearDown(self):
     # Code to execute after a test is being run.
     self.expiration_time = self.original_expiration_time
     MarionetteTestCase.tearDown(self)
开发者ID:aeddi,项目名称:gecko-dev,代码行数:4,代码来源:test_touchcaret.py


示例19: setUp

 def setUp(self):
     # Code to execute before a test is being run.
     MarionetteTestCase.setUp(self)
     self.actions = Actions(self.marionette)
     self.original_expiration_time = self.expiration_time
开发者ID:aeddi,项目名称:gecko-dev,代码行数:5,代码来源:test_touchcaret.py


示例20: setUp

 def setUp(self):
     try:
         self.testVar["test"]
     except KeyError:
         raise SkipTest("email key not present in dict, skip ...")
     MarionetteTestCase.setUp(self)
开发者ID:jpetrell,项目名称:gecko-dev,代码行数:6,代码来源:test_skip_setup.py



注:本文中的marionette_test.MarionetteTestCase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python markdown.markdown函数代码示例发布时间:2022-05-27
下一篇:
Python marionette_harness.MarionetteTestCase类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap