Skip to content

Commit bc76dbd

Browse files
authored
Merge pull request #488 from seleniumbase/treat-edge-like-chrome
Treat the new Chromium Edge browser like Chrome
2 parents 47f1b67 + 206a6c2 commit bc76dbd

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pip>=19.3.1
1+
pip>=20.0.1
22
setuptools>=44.0.0;python_version<"3"
33
setuptools>=45.1.0;python_version>="3"
44
setuptools-scm>=3.4.2
@@ -8,7 +8,7 @@ nose==1.3.7
88
ipdb==0.12.3
99
idna==2.8
1010
chardet==3.0.4
11-
urllib3==1.25.7
11+
urllib3==1.25.8
1212
requests==2.22.0
1313
selenium==3.141.0
1414
pluggy>=0.13.1
@@ -43,4 +43,4 @@ tqdm>=4.41.1
4343
flake8==3.7.9
4444
certifi>=2019.11.28
4545
pdfminer.six==20191110;python_version<"3.5"
46-
pdfminer.six==20200104;python_version>="3.5"
46+
pdfminer.six==20200121;python_version>="3.5"

seleniumbase/core/browser_launcher.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,12 @@ def get_driver(browser_name, headless=False, use_grid=False,
355355
'The format for using a proxy server with authentication '
356356
'is: "username:password@hostname:port". If using a proxy '
357357
'server without auth, the format is: "hostname:port".')
358-
if browser_name != constants.Browser.GOOGLE_CHROME:
358+
if browser_name != constants.Browser.GOOGLE_CHROME and (
359+
browser_name != constants.Browser.EDGE):
359360
raise Exception(
360-
"Chrome is required when using a proxy server that has "
361-
"authentication! (If using a proxy server without auth, "
362-
"either Chrome or Firefox may be used.)")
361+
"Chrome or Edge is required when using a proxy server "
362+
"that has authentication! (If using a proxy server "
363+
"without auth, Chrome, Edge, or Firefox may be used.)")
363364
proxy_string = validate_proxy_string(proxy_string)
364365
if proxy_string and proxy_user and proxy_pass:
365366
proxy_auth = True

seleniumbase/fixtures/base_case.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ def get_new_driver(self, browser=None, headless=None,
15021502
# WebDrivers can get closed during tearDown().
15031503
pass
15041504
else:
1505-
if self.browser == 'chrome':
1505+
if self.browser == 'chrome' or self.browser == 'edge':
15061506
width = settings.CHROME_START_WIDTH
15071507
height = settings.CHROME_START_HEIGHT
15081508
try:
@@ -1522,12 +1522,6 @@ def get_new_driver(self, browser=None, headless=None,
15221522
self.wait_for_ready_state_complete()
15231523
except Exception:
15241524
pass # Keep existing browser resolution
1525-
elif self.browser == 'edge':
1526-
try:
1527-
self.driver.maximize_window()
1528-
self.wait_for_ready_state_complete()
1529-
except Exception:
1530-
pass # Keep existing browser resolution
15311525
if self.start_page and len(self.start_page) >= 4:
15321526
if page_utils.is_valid_url(self.start_page):
15331527
self.open(self.start_page)
@@ -2299,9 +2293,10 @@ def assert_no_js_errors(self):
22992293
current_url = self.get_current_url()
23002294
raise Exception(
23012295
"JavaScript errors found on %s => %s" % (current_url, errors))
2302-
if self.demo_mode and self.browser == 'chrome':
2303-
messenger_post = ("ASSERT NO JS ERRORS")
2304-
self.__highlight_with_assert_success(messenger_post, "html")
2296+
if self.demo_mode:
2297+
if (self.browser == 'chrome' or self.browser == 'edge'):
2298+
messenger_post = ("ASSERT NO JS ERRORS")
2299+
self.__highlight_with_assert_success(messenger_post, "html")
23052300

23062301
def __activate_html_inspector(self):
23072302
self.wait_for_ready_state_complete()

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
setup(
4747
name='seleniumbase',
48-
version='1.34.25',
48+
version='1.34.26',
4949
description='Fast, Easy, and Reliable Browser Automation & Testing.',
5050
long_description=long_description,
5151
long_description_content_type='text/markdown',
@@ -81,7 +81,7 @@
8181
"Programming Language :: Python :: 3.8",
8282
],
8383
install_requires=[
84-
'pip>=19.3.1', # >= 19.3.1 required for Python 3.8+
84+
'pip>=20.0.1',
8585
'setuptools',
8686
'setuptools-scm',
8787
'wheel',
@@ -90,7 +90,7 @@
9090
'ipdb',
9191
'idna==2.8', # Must stay in sync with "requests"
9292
'chardet==3.0.4', # Must stay in sync with "requests"
93-
'urllib3==1.25.7', # Must stay in sync with "requests"
93+
'urllib3==1.25.8', # Must stay in sync with "requests"
9494
'requests==2.22.0',
9595
'selenium==3.141.0',
9696
'pluggy>=0.13.1',
@@ -125,7 +125,7 @@
125125
'flake8==3.7.9',
126126
'certifi>=2019.11.28',
127127
'pdfminer.six==20191110;python_version<"3.5"',
128-
'pdfminer.six==20200104;python_version>="3.5"',
128+
'pdfminer.six==20200121;python_version>="3.5"',
129129
],
130130
packages=[
131131
'seleniumbase',

0 commit comments

Comments
 (0)