Skip to content

Commit 90975cf

Browse files
authored
Merge pull request #272 from seleniumbase/new-updates
Update requirements and a few other things
2 parents 003d941 + 0c21ca6 commit 90975cf

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ unittest2
88
selenium==3.141.0
99
requests==2.21.0
1010
urllib3==1.24.1
11-
pytest>=4.1.1
11+
pytest>=4.2.0
1212
pytest-cov>=2.6.1
1313
pytest-html>=1.20.0
1414
pytest-rerunfailures>=6.0
15-
pytest-xdist>=1.26.0
15+
pytest-xdist>=1.26.1
1616
parameterized==0.6.3
1717
beautifulsoup4>=4.6.0
1818
colorama==0.4.1
1919
pyotp>=2.2.7
2020
boto>=2.49.0
21-
flake8==3.6.0
21+
flake8==3.7.3
2222
PyVirtualDisplay==0.2.1
2323
-e .

seleniumbase/config/settings.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
# If False, only the downloads from the most recent run will be saved locally.
2626
ARCHIVE_EXISTING_DOWNLOADS = False
2727

28-
# Default names for files saved during test failures when logging is turned on.
28+
# Default names for files saved during test failures.
2929
# (These files will get saved to the "latest_logs/" folder)
30-
# Usage: "--with-testing_base"
3130
SCREENSHOT_NAME = "screenshot.png"
3231
BASIC_INFO_NAME = "basic_test_info.txt"
3332
PAGE_SOURCE_NAME = "page_source.html"
@@ -70,6 +69,11 @@
7069
# Messenger notifications appear when reaching assert statements in Demo Mode.
7170
DEFAULT_MESSAGE_DURATION = 2.55
7271

72+
# If True, an Exception is raised immediately for invalid proxy string syntax.
73+
# If False, a Warning will appear after the test, with no proxy server used.
74+
# (This applies when using --proxy=[PROXY_STRING] for using a proxy server.)
75+
RAISE_INVALID_PROXY_STRING_EXCEPTION = True
76+
7377
# #####>>>>>----- MasterQA SETTINGS -----<<<<<#####
7478
# ##### (Used when importing MasterQA as the parent class)
7579

seleniumbase/core/browser_launcher.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from selenium.common.exceptions import WebDriverException
1010
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
1111
from seleniumbase.config import proxy_list
12+
from seleniumbase.config import settings
1213
from seleniumbase.core import download_helper
1314
from seleniumbase.core import proxy_helper
1415
from seleniumbase.core import capabilities_parser
@@ -86,6 +87,7 @@ def _set_chrome_options(
8687
chrome_options = webdriver.ChromeOptions()
8788
prefs = {
8889
"download.default_directory": downloads_path,
90+
"local_discovery.notifications_enabled": False,
8991
"credentials_enable_service": False,
9092
"profile": {
9193
"password_manager_enabled": False
@@ -150,12 +152,16 @@ def _create_firefox_profile(downloads_path, proxy_string):
150152
def display_proxy_warning(proxy_string):
151153
message = ('\n\nWARNING: Proxy String ["%s"] is NOT in the expected '
152154
'"ip_address:port" or "server:port" format, '
153-
'(OR the key does not exist in proxy_list.PROXY_LIST). '
154-
'*** DEFAULTING to NOT USING a Proxy Server! ***'
155+
'(OR the key does not exist in '
156+
'seleniumbase.config.proxy_list.PROXY_LIST).'
155157
% proxy_string)
156-
warnings.simplefilter('always', Warning) # See Warnings
157-
warnings.warn(message, category=Warning, stacklevel=2)
158-
warnings.simplefilter('default', Warning) # Set Default
158+
if settings.RAISE_INVALID_PROXY_STRING_EXCEPTION:
159+
raise Exception(message)
160+
else:
161+
message += ' *** DEFAULTING to NOT USING a Proxy Server! ***'
162+
warnings.simplefilter('always', Warning) # See Warnings
163+
warnings.warn(message, category=Warning, stacklevel=2)
164+
warnings.simplefilter('default', Warning) # Set Default
159165

160166

161167
def validate_proxy_string(proxy_string):

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
setup(
1919
name='seleniumbase',
20-
version='1.18.2',
21-
description='Reliable Browser Automation & Testing Framework',
20+
version='1.19.0',
21+
description='Easy, Fast, Reliable Browser Automation & Testing Framework',
2222
long_description=long_description,
2323
long_description_content_type='text/markdown',
2424
url='https://github.com/seleniumbase/SeleniumBase',
@@ -61,17 +61,17 @@
6161
'selenium==3.141.0',
6262
'requests==2.21.0', # Changing this may effect "urllib3"
6363
'urllib3==1.24.1', # Keep this lib in sync with "requests"
64-
'pytest>=4.1.1',
64+
'pytest>=4.2.0',
6565
'pytest-cov>=2.6.1',
6666
'pytest-html>=1.20.0',
6767
'pytest-rerunfailures>=6.0',
68-
'pytest-xdist>=1.26.0',
68+
'pytest-xdist>=1.26.1',
6969
'parameterized==0.6.3',
7070
'beautifulsoup4>=4.6.0', # Keep at >=4.6.0 while using bs4
7171
'colorama==0.4.1',
7272
'pyotp>=2.2.7',
7373
'boto>=2.49.0',
74-
'flake8==3.6.0',
74+
'flake8==3.7.3',
7575
'PyVirtualDisplay==0.2.1',
7676
],
7777
packages=[

0 commit comments

Comments
 (0)