From 9355d6c80f18a9374bc838702e9e50aafe1476b8 Mon Sep 17 00:00:00 2001 From: ssenart Date: Sat, 31 Aug 2019 23:02:48 +0200 Subject: [PATCH] WebDriver window size must be large enough to display all clickable components --- CHANGELOG.md | 7 ++++++- pygazpar/client.py | 5 ++++- setup.py | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 337cd58..b43f79c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.9] - 2019-08-31 +### Fixed +- WebDriver window size must be large enough to display all clickable components. + ## [0.1.8] - 2019-08-31 ### Changed - Use PropertyNameEnum type to store all property names. @@ -24,7 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - Remove Client.data property to get the updated data. Replaced with Client.__data private property. -[Unreleased]: https://github.com/ssenart/PyGazpar/compare/0.1.8...HEAD +[Unreleased]: https://github.com/ssenart/PyGazpar/compare/0.1.9...HEAD +[0.1.9]: https://github.com/ssenart/PyGazpar/compare/0.1.7...0.1.9 [0.1.8]: https://github.com/ssenart/PyGazpar/compare/0.1.7...0.1.8 [0.1.7]: https://github.com/ssenart/PyGazpar/compare/0.1.6...0.1.7 [0.1.6]: https://github.com/ssenart/PyGazpar/compare/0.1.5...0.1.6 diff --git a/pygazpar/client.py b/pygazpar/client.py index 0442ddf..b1ed9ef 100644 --- a/pygazpar/client.py +++ b/pygazpar/client.py @@ -55,6 +55,9 @@ def update(self): driver = webdriver.Firefox(executable_path=self.__firefox_webdriver_executable, firefox_profile=profile, options=options, service_log_path=self.__tmp_directory + '/geckodriver.log') try: + driver.set_window_position(0, 0) + driver.set_window_size(1200, 1200) + driver.implicitly_wait(self.__wait_time) ## Login URL @@ -112,7 +115,7 @@ def update(self): data_timestamp = datetime.now().isoformat() # Wait a few for the download to complete - time.sleep(5) + time.sleep(10) # Load the XLSX file into the data structure file_list = glob.glob(data_file_path_pattern) diff --git a/setup.py b/setup.py index 8b5956f..9b65687 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setuptools.setup( name = 'pygazpar', - version = '0.1.8', + version = '0.1.9', author = 'Stephane Senart', author_email = 'stephane.senart@gmail.com', description = 'Retrieve gas consumption from GrDF web site (French Gas Company)', @@ -23,7 +23,7 @@ 'Programming Language :: Python :: 3.7', ], python_requires='>=3.7', - download_url = 'https://github.com/ssenart/pygazpar/releases/tag/0.1.8', + download_url = 'https://github.com/ssenart/pygazpar/releases/tag/0.1.9', keywords = ['ENERGY', 'NATURAL GAS', 'CONSUMPTION'], # Keywords that define your package best entry_points={ 'console_scripts': [