From fcf1d4b2f87767ce71ba37c2ddcd7b2820452bce Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Fri, 17 Aug 2018 19:57:00 -0400 Subject: [PATCH 1/3] Set Chrome browser default window size on launch --- seleniumbase/core/browser_launcher.py | 6 ------ seleniumbase/fixtures/base_case.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/seleniumbase/core/browser_launcher.py b/seleniumbase/core/browser_launcher.py index 6ee00d22..83adada0 100755 --- a/seleniumbase/core/browser_launcher.py +++ b/seleniumbase/core/browser_launcher.py @@ -5,7 +5,6 @@ import warnings from selenium import webdriver from selenium.common.exceptions import WebDriverException from selenium.webdriver.common.desired_capabilities import DesiredCapabilities -from seleniumbase.config import settings from seleniumbase.config import proxy_list from seleniumbase.core import download_helper from seleniumbase.fixtures import constants @@ -73,11 +72,6 @@ def _set_chrome_options(downloads_path, proxy_string): chrome_options.add_argument("--disable-web-security") if proxy_string: chrome_options.add_argument('--proxy-server=%s' % proxy_string) - if settings.START_CHROME_IN_FULL_SCREEN_MODE: - # Run Chrome in full screen mode on WINDOWS - chrome_options.add_argument("--start-maximized") - # Run Chrome in full screen mode on MAC/Linux - chrome_options.add_argument("--kiosk") if "win32" in sys.platform or "win64" in sys.platform: chrome_options.add_argument("--log-level=3") return chrome_options diff --git a/seleniumbase/fixtures/base_case.py b/seleniumbase/fixtures/base_case.py index f2bc405f..9c0b481e 100755 --- a/seleniumbase/fixtures/base_case.py +++ b/seleniumbase/fixtures/base_case.py @@ -2252,11 +2252,22 @@ class BaseCase(unittest.TestCase): # Make sure the invisible browser window is big enough try: self.set_window_size(1920, 1200) + self.wait_for_ready_state_complete() except Exception: # This shouldn't fail, but in case it does, # get safely through setUp() so that # WebDrivers can get closed during tearDown(). pass + else: + if self.browser == 'chrome': + try: + if settings.START_CHROME_IN_FULL_SCREEN_MODE: + self.driver.maximize_window() + else: + self.driver.set_window_size(1250, 800) + self.wait_for_ready_state_complete() + except Exception: + pass # Keep existing browser resolution return new_driver def switch_to_driver(self, driver): From d2c372481afadd9448a4503b5108d99dbf522191 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Fri, 17 Aug 2018 19:57:16 -0400 Subject: [PATCH 2/3] Version 1.14.4 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a8fd5eed..9d038c76 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages # noqa setup( name='seleniumbase', - version='1.14.3', + version='1.14.4', description='Web Automation & Testing Framework - http://seleniumbase.com', long_description='Web Automation and Testing Framework - seleniumbase.com', platforms='Mac * Windows * Linux * Docker', From 4ce5742d639c9deb1a169b186e6343087c2b7574 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Fri, 17 Aug 2018 20:36:56 -0400 Subject: [PATCH 3/3] Update the ReadMe --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4fbf5542..cc0ae764 100755 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -[](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md) +[](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md) -[Version](https://pypi.python.org/pypi/seleniumbase) [GitHub Stars](https://github.com/seleniumbase/SeleniumBase/stargazers) [Build Status](https://travis-ci.org/seleniumbase/SeleniumBase) [Join the Gitter Chat](https://gitter.im/seleniumbase/SeleniumBase)
+[Version](https://pypi.python.org/pypi/seleniumbase) [Python versions](https://pypi.python.org/pypi/seleniumbase) [Build Status](https://travis-ci.org/seleniumbase/SeleniumBase) [Join the Gitter Chat](https://gitter.im/seleniumbase/SeleniumBase) [MIT License](https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE) [GitHub Stars](https://github.com/seleniumbase/SeleniumBase/stargazers)
-SeleniumBase extends [WebDriver](https://docs.microsoft.com/en-us/microsoft-edge/webdriver) into a complete framework for end-to-end testing with [Pytest](https://github.com/pytest-dev/pytest). +SeleniumBase transforms [WebDriver](https://www.seleniumhq.org/) into a complete test framework that runs with [Pytest](https://github.com/pytest-dev/pytest). ## ![http://seleniumbase.com](https://cdn2.hubspot.net/hubfs/100006/images/super_logo_tiny.png "SeleniumBase") Quick Start