Skip to content

Commit b971e6f

Browse files
authored
Merge pull request #394 from seleniumbase/update-requirements-for-better-compatibility
Update requirements for better compatibility
2 parents 84b88f2 + fd7624e commit b971e6f

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ COPY requirements.txt /SeleniumBase/requirements.txt
6868
COPY setup.py /SeleniumBase/setup.py
6969
RUN pip install --upgrade pip
7070
RUN pip install --upgrade setuptools
71+
RUN pip install --upgrade setuptools-scm
7172
RUN cd /SeleniumBase && ls && pip install -r requirements.txt --upgrade
7273
RUN cd /SeleniumBase && python setup.py develop
7374
RUN seleniumbase install chromedriver

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ chardet==3.0.4
1010
urllib3==1.25.6
1111
requests>=2.22.0
1212
selenium==3.141.0
13-
pluggy>=0.12.0
14-
attrs>=19.2.0
13+
pluggy>=0.13.0
14+
attrs>=19.3.0
1515
pytest>=4.6.6;python_version<"3"
1616
pytest>=5.2.1;python_version>="3"
1717
pytest-cov>=2.8.1
@@ -29,6 +29,7 @@ colorama>=0.4.1
2929
pymysql>=0.9.3
3030
pyotp>=2.3.0
3131
boto>=2.49.0
32+
cffi>=1.13.0
3233
tqdm>=4.36.1
3334
flake8>=3.7.8
3435
certifi>=2019.9.11

seleniumbase/fixtures/base_case.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,11 @@ def assert_link_status_code_is_not_404(self, link):
16811681
def assert_no_404_errors(self, multithreaded=True):
16821682
""" Assert no 404 errors from page links obtained from:
16831683
"a"->"href", "img"->"src", "link"->"href", and "script"->"src". """
1684-
links = self.get_unique_links()
1684+
all_links = self.get_unique_links()
1685+
links = []
1686+
for link in all_links:
1687+
if "javascript:" not in link and "mailto:" not in link:
1688+
links.append(link)
16851689
if multithreaded:
16861690
from multiprocessing.dummy import Pool as ThreadPool
16871691
pool = ThreadPool(10)
@@ -1690,12 +1694,10 @@ def assert_no_404_errors(self, multithreaded=True):
16901694
pool.join()
16911695
else:
16921696
for link in links:
1693-
if "javascript:" not in link: # Ignore links with JavaScript
1694-
self.assert_link_status_code_is_not_404(link)
1697+
self.assert_link_status_code_is_not_404(link)
16951698
if self.demo_mode:
16961699
messenger_post = ("ASSERT NO 404 ERRORS")
1697-
js_utils.post_messenger_success_message(
1698-
self.driver, messenger_post, self.message_duration)
1700+
self.__highlight_with_assert_success(messenger_post, "html")
16991701

17001702
def print_unique_links_with_status_codes(self):
17011703
""" Finds all unique links in the html of the page source
@@ -1839,9 +1841,8 @@ def assert_title(self, title):
18391841
"does not match the actual page title [%s]!"
18401842
"" % (expected, actual))
18411843
if self.demo_mode:
1842-
messenger_post = ("ASSERT TITLE: {%s}" % title)
1843-
js_utils.post_messenger_success_message(
1844-
self.driver, messenger_post, self.message_duration)
1844+
messenger_post = ("ASSERT TITLE = {%s}" % title)
1845+
self.__highlight_with_assert_success(messenger_post, "html")
18451846

18461847
def assert_no_js_errors(self):
18471848
""" Asserts that there are no JavaScript "SEVERE"-level page errors.
@@ -1868,6 +1869,9 @@ def assert_no_js_errors(self):
18681869
current_url = self.get_current_url()
18691870
raise Exception(
18701871
"JavaScript errors found on %s => %s" % (current_url, errors))
1872+
if self.demo_mode and self.browser == 'chrome':
1873+
messenger_post = ("ASSERT NO JS ERRORS")
1874+
self.__highlight_with_assert_success(messenger_post, "html")
18711875

18721876
def get_google_auth_password(self, totp_key=None):
18731877
""" Returns a time-based one-time password based on the

setup.py

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

4646
setup(
4747
name='seleniumbase',
48-
version='1.32.12',
48+
version='1.32.13',
4949
description='Fast, Easy, and Reliable Browser Automation & Testing.',
5050
long_description=long_description,
5151
long_description_content_type='text/markdown',
@@ -93,8 +93,8 @@
9393
'urllib3==1.25.6', # Must stay in sync with "requests"
9494
'requests>=2.22.0',
9595
'selenium==3.141.0',
96-
'pluggy>=0.12.0',
97-
'attrs>=19.2.0',
96+
'pluggy>=0.13.0',
97+
'attrs>=19.3.0',
9898
'pytest>=4.6.6;python_version<"3"', # For Python 2 compatibility
9999
'pytest>=5.2.1;python_version>="3"',
100100
'pytest-cov>=2.8.1',
@@ -112,6 +112,7 @@
112112
'pymysql>=0.9.3',
113113
'pyotp>=2.3.0',
114114
'boto>=2.49.0',
115+
'cffi>=1.13.0',
115116
'tqdm>=4.36.1',
116117
'flake8>=3.7.8',
117118
'certifi>=2019.9.11',

0 commit comments

Comments
 (0)