Skip to content

Commit c284ae2

Browse files
authored
Merge pull request #1533 from seleniumbase/fix-issue-with-behave-headless-mode
Fix issue with "behave" headless mode, and more
2 parents f1bc9ce + 8bb8894 commit c284ae2

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<meta property="og:image" content="https://seleniumbase.github.io/cdn/img/mac_sb_logo_5b.png" />
66
<link rel="icon" href="https://seleniumbase.github.io/img/green_logo2.png" />
77

8-
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/mac_sb_logo_bw.png" alt="SeleniumBase" title="SeleniumBase" width="408" /></a></p>
8+
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/mac_sb_logo_bg6.png" alt="SeleniumBase" title="SeleniumBase" width="408" /></a></p>
99

10-
<p align="center"><b>A framework for browser automation & testing with <a href="https://www.python.org/about/" target="_blank">Python</a>.</b><br />SeleniumBase extends <a href="https://www.selenium.dev/documentation/webdriver/" target="_blank">Selenium WebDriver</a> as a <a href="https://docs.pytest.org/en/latest/how-to/usage.html" target="_blank">pytest</a> plugin.</p>
10+
<p align="center"><b>A web automation framework for E2E testing with <a href="https://www.python.org/about/" target="_blank">Python</a>.</b><br />SeleniumBase extends <a href="https://www.selenium.dev/documentation/webdriver/" target="_blank">Selenium WebDriver</a> as a <a href="https://docs.pytest.org/en/latest/how-to/usage.html" target="_blank">pytest</a> plugin.</p>
1111

1212
<p align="center"><a href="https://pypi.python.org/pypi/seleniumbase" target="_blank"><img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=3399EE" alt="PyPI version" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/releases" target="_blank"><img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=22AAEE" alt="GitHub version" /></a> <a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions" target="_blank"><img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://gitter.im/seleniumbase/SeleniumBase" target="_blank"><img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="SeleniumBase" /></a></p>
1313

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ packaging>=20.9;python_version<"3.6"
55
packaging>=21.3;python_version>="3.6"
66
setuptools>=44.1.1;python_version<"3.6"
77
setuptools>=59.6.0;python_version>="3.6" and python_version<"3.7"
8-
setuptools>=65.4.0;python_version>="3.7"
8+
setuptools>=65.4.1;python_version>="3.7"
99
tomli>=1.2.3;python_version>="3.6" and python_version<"3.7"
1010
tomli>=2.0.1;python_version>="3.7"
1111
tqdm>=4.64.1
@@ -125,7 +125,7 @@ rich==12.5.1;python_version>="3.6" and python_version<"4.0"
125125

126126
coverage==5.5;python_version<"3.6"
127127
coverage==6.2;python_version>="3.6" and python_version<"3.7"
128-
coverage==6.4.4;python_version>="3.7"
128+
coverage==6.5.0;python_version>="3.7"
129129
pytest-cov==2.12.1;python_version<"3.6"
130130
pytest-cov==4.0.0;python_version>="3.6"
131131
flake8==3.7.9;python_version<"3.6"

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.5.0"
2+
__version__ = "4.5.1"

seleniumbase/fixtures/base_case.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ def __initialize_variables(self):
9999
self.driver = None
100100
self.environment = None
101101
self.env = None # Add a shortened version of self.environment
102-
self.headless = None
103-
self.headless2 = None # The new headless mode for Chromium
104-
self.version_tuple = (
105-
tuple([int(i) for i in __version__.split(".") if i.isdigit()])
106-
)
102+
self.version_list = [
103+
int(i) for i in __version__.split(".") if i.isdigit()
104+
]
105+
self.version_tuple = tuple(self.version_list)
106+
self.version_info = self.version_tuple
107107
self.__page_sources = []
108108
self.__extra_actions = []
109109
self.__js_start_time = 0
@@ -5588,12 +5588,14 @@ def get_unique_links(self):
55885588
"a"->"href", "img"->"src", "link"->"href", and "script"->"src".
55895589
"""
55905590
self.__check_scope()
5591+
if settings.SKIP_JS_WAITS and self.page_load_strategy == "none":
5592+
time.sleep(0.16)
55915593
try:
55925594
self.wait_for_element_visible("body", timeout=1.5)
55935595
except Exception:
55945596
pass
5595-
page_url = self.get_current_url()
55965597
soup = self.get_beautiful_soup(self.get_page_source())
5598+
page_url = self.get_current_url()
55975599
links = page_utils._get_unique_links(page_url, soup)
55985600
return links
55995601

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
'packaging>=21.3;python_version>="3.6"',
132132
'setuptools>=44.1.1;python_version<"3.6"',
133133
'setuptools>=59.6.0;python_version>="3.6" and python_version<"3.7"',
134-
'setuptools>=65.4.0;python_version>="3.7"',
134+
'setuptools>=65.4.1;python_version>="3.7"',
135135
'tomli>=1.2.3;python_version>="3.6" and python_version<"3.7"',
136136
'tomli>=2.0.1;python_version>="3.7"',
137137
"tqdm>=4.64.1",
@@ -251,7 +251,7 @@
251251
"coverage": [
252252
'coverage==5.5;python_version<"3.6"',
253253
'coverage==6.2;python_version>="3.6" and python_version<"3.7"',
254-
'coverage==6.4.4;python_version>="3.7"',
254+
'coverage==6.5.0;python_version>="3.7"',
255255
'pytest-cov==2.12.1;python_version<"3.6"',
256256
'pytest-cov==4.0.0;python_version>="3.6"',
257257
],

0 commit comments

Comments
 (0)