def setUpClass(cls):
if not cls.display_browser_window():
display_args = {'visible': False}
if cls.browser_window_size is not None:
# For some browsers, we need display to be bigger
# than the size we want the window to be.
width, height = cls.browser_window_size
display_args['size'] = (width + 500, height + 500)
cls.__display = Display(**display_args)
cls.__display.start()
# We have one driver attached to the class, re-used between test runs
# for speed. Manually started driver instances (using new_browser_session)
# are cleaned up at the end of an individual test.
cls._cls_driver = cls._create_browser_instance()
super(FuncSeleniumMixin, cls).setUpClass()
评论列表
文章目录