Skip to content

Commit 668d646

Browse files
authored
Merge pull request #2601 from seleniumbase/an-update-and-a-fix
An update and a fix
2 parents 0ea82ce + d9b77ae commit 668d646

File tree

7 files changed

+53
-39
lines changed

7 files changed

+53
-39
lines changed

mkdocs_build/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ regex>=2023.12.25
55
pymdown-extensions>=10.7.1
66
pipdeptree>=2.16.1
77
python-dateutil>=2.8.2
8-
Markdown==3.5.2
8+
Markdown==3.6
99
markdown2==2.4.13
1010
MarkupSafe==2.1.5
1111
Jinja2==3.1.3

requirements.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
pip>=24.0
2-
packaging>=23.2
2+
packaging>=24.0
33
setuptools>=68.0.0;python_version<"3.8"
4-
setuptools>=69.1.1;python_version>="3.8"
5-
wheel>=0.42.0
4+
setuptools>=69.2.0;python_version>="3.8"
5+
wheel>=0.42.0;python_version<"3.8"
6+
wheel>=0.43.0;python_version>="3.8"
67
attrs>=23.2.0
78
certifi>=2024.2.2
89
filelock>=3.12.2;python_version<"3.8"
@@ -44,7 +45,8 @@ pytest-html==2.0.1
4445
pytest-metadata==3.0.0;python_version<"3.8"
4546
pytest-metadata==3.1.1;python_version>="3.8"
4647
pytest-ordering==0.6
47-
pytest-rerunfailures==13.0
48+
pytest-rerunfailures==13.0;python_version<"3.8"
49+
pytest-rerunfailures==14.0;python_version>="3.8"
4850
pytest-xdist==3.5.0
4951
parameterized==0.9.0
5052
sbvirtualdisplay==1.3.0

seleniumbase/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.24.5"
2+
__version__ = "4.24.6"

seleniumbase/console_scripts/sb_install.py

+24-19
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,7 @@ def main(override=None, intel_for_uc=None, force_uc=None):
710710
p_version = c3 + use_version + cr
711711
log_d("\n*** %s = %s" % (msg, p_version))
712712
elif name == "iedriver":
713-
major_version = "3.14"
714-
full_version = "3.14.0"
713+
full_version = "4.14.0"
715714
use_version = full_version
716715
if IS_WINDOWS and "64" in ARCH:
717716
file_name = "IEDriverServer_x64_%s.zip" % full_version
@@ -723,8 +722,9 @@ def main(override=None, intel_for_uc=None, force_uc=None):
723722
"Windows-based systems!"
724723
)
725724
download_url = (
726-
"https://selenium-release.storage.googleapis.com/"
727-
"%s/%s" % (major_version, file_name)
725+
"https://github.com/SeleniumHQ/selenium/"
726+
"releases/download/selenium-"
727+
"%s/%s" % (full_version, file_name)
728728
)
729729
headless_ie_version = "v1.4"
730730
headless_ie_file_name = "headless-selenium-for-win-v1-4.zip"
@@ -949,7 +949,11 @@ def main(override=None, intel_for_uc=None, force_uc=None):
949949
make_executable(path_file)
950950
log_d("Also copied to: %s%s%s" % (c3, path_file, cr))
951951
log_d("")
952-
elif name == "edgedriver" or name == "msedgedriver":
952+
elif (
953+
name == "edgedriver"
954+
or name == "msedgedriver"
955+
or name == "iedriver"
956+
):
953957
if IS_MAC or IS_LINUX:
954958
# Mac / Linux
955959
expected_contents = [
@@ -969,6 +973,8 @@ def main(override=None, intel_for_uc=None, force_uc=None):
969973
"Driver_Notes/LICENSE",
970974
"msedgedriver.exe",
971975
]
976+
if name == "iedriver":
977+
expected_contents = ["IEDriverServer.exe"]
972978
if len(contents) > 5:
973979
raise Exception("Unexpected content in EdgeDriver Zip file!")
974980
for content in contents:
@@ -984,21 +990,20 @@ def main(override=None, intel_for_uc=None, force_uc=None):
984990
# Remove existing version if exists
985991
str_name = str(f_name)
986992
new_file = os.path.join(downloads_folder, str_name)
987-
if IS_MAC or IS_LINUX:
988-
# Mac / Linux
989-
if str_name == "msedgedriver":
990-
driver_file = str_name
991-
driver_path = new_file
992-
if os.path.exists(new_file):
993-
os.remove(new_file)
994-
else:
995-
# Windows
996-
if str_name == "msedgedriver.exe":
997-
driver_file = str_name
998-
driver_path = new_file
999-
if os.path.exists(new_file):
1000-
os.remove(new_file)
993+
if (
994+
((IS_MAC or IS_LINUX) and str_name == "msedgedriver")
995+
or (
996+
str_name == "msedgedriver.exe"
997+
or str_name == "IEDriverServer.exe"
998+
)
999+
):
1000+
driver_file = str_name
1001+
driver_path = new_file
1002+
if os.path.exists(new_file):
1003+
os.remove(new_file)
10011004
if not driver_file or not driver_path:
1005+
if str_name == "IEDriverServer.exe":
1006+
raise Exception("IEDriverServer missing from Zip file!")
10021007
raise Exception("msedgedriver missing from Zip file!")
10031008
log_d("Extracting %s from %s ..." % (contents, file_name))
10041009
zip_ref.extractall(downloads_folder)

seleniumbase/core/browser_launcher.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -2304,14 +2304,14 @@ def get_local_driver(
23042304
"IE Browser is for Windows-based systems only!"
23052305
)
23062306
from selenium.webdriver.ie.options import Options
2307+
from selenium.webdriver.ie.service import Service
23072308
ie_options = Options()
23082309
ie_options.ignore_protected_mode_settings = True
23092310
ie_options.ignore_zoom_level = True
23102311
ie_options.require_window_focus = False
23112312
ie_options.native_events = True
23122313
ie_options.full_page_screenshot = True
23132314
ie_options.persistent_hover = True
2314-
ie_capabilities = ie_options.to_capabilities()
23152315
if LOCAL_IEDRIVER and os.path.exists(LOCAL_IEDRIVER):
23162316
try:
23172317
make_driver_executable_if_not(LOCAL_IEDRIVER)
@@ -2345,16 +2345,18 @@ def get_local_driver(
23452345
log_d("\nWarning: HeadlessIEDriver not found. Getting it now:")
23462346
sb_install.main(override="iedriver")
23472347
sys.argv = sys_args # Put back the original sys args
2348+
d_b_c = "--disable-build-check"
23482349
if not headless:
23492350
warnings.simplefilter("ignore", category=DeprecationWarning)
2350-
driver = webdriver.Ie(capabilities=ie_capabilities)
2351+
service = Service(service_args=[d_b_c])
2352+
driver = webdriver.Ie(service=service, options=ie_options)
23512353
return extend_driver(driver)
23522354
else:
23532355
warnings.simplefilter("ignore", category=DeprecationWarning)
2354-
driver = webdriver.Ie(
2355-
executable_path=LOCAL_HEADLESS_IEDRIVER,
2356-
capabilities=ie_capabilities,
2356+
service = Service(
2357+
executable_path=LOCAL_IEDRIVER, service_args=[d_b_c],
23572358
)
2359+
driver = webdriver.Ie(service=service, options=ie_options)
23582360
return extend_driver(driver)
23592361
elif browser_name == constants.Browser.EDGE:
23602362
prefs = {

seleniumbase/fixtures/base_case.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def __initialize_variables(self):
159159
self._language = "English"
160160
self._presentation_slides = {}
161161
self._presentation_transition = {}
162+
self._output_file_saves = True # For Presenter / ChartMaker
162163
self._rec_overrides_switch = True # Recorder-Mode uses set_c vs switch
163164
self._sb_test_identifier = None
164165
self._html_report_extra = [] # (Used by pytest_plugin.py)
@@ -11187,7 +11188,8 @@ def save_presentation(
1118711188
out_file = codecs.open(file_path, "w+", encoding="utf-8")
1118811189
out_file.writelines(the_html)
1118911190
out_file.close()
11190-
print("\n>>> [%s] was saved!\n" % file_path)
11191+
if self._output_file_saves:
11192+
print("\n>>> [%s] was saved!\n" % file_path)
1119111193
return file_path
1119211194

1119311195
def begin_presentation(
@@ -11885,7 +11887,8 @@ def save_chart(self, chart_name=None, filename=None, folder=None):
1188511887
out_file = codecs.open(file_path, "w+", encoding="utf-8")
1188611888
out_file.writelines(the_html)
1188711889
out_file.close()
11888-
print("\n>>> [%s] was saved!" % file_path)
11890+
if self._output_file_saves:
11891+
print("\n>>> [%s] was saved!" % file_path)
1188911892
return file_path
1189011893

1189111894
def display_chart(self, chart_name=None, filename=None, interval=0):

setup.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,11 @@
147147
python_requires=">=3.7",
148148
install_requires=[
149149
'pip>=24.0',
150-
'packaging>=23.2',
150+
'packaging>=24.0',
151151
'setuptools>=68.0.0;python_version<"3.8"',
152-
'setuptools>=69.1.1;python_version>="3.8"',
153-
'wheel>=0.42.0',
152+
'setuptools>=69.2.0;python_version>="3.8"',
153+
'wheel>=0.42.0;python_version<"3.8"',
154+
'wheel>=0.43.0;python_version>="3.8"',
154155
'attrs>=23.2.0',
155156
"certifi>=2024.2.2",
156157
'filelock>=3.12.2;python_version<"3.8"',
@@ -192,7 +193,8 @@
192193
'pytest-metadata==3.0.0;python_version<"3.8"',
193194
'pytest-metadata==3.1.1;python_version>="3.8"',
194195
"pytest-ordering==0.6",
195-
'pytest-rerunfailures==13.0',
196+
'pytest-rerunfailures==13.0;python_version<"3.8"',
197+
'pytest-rerunfailures==14.0;python_version>="3.8"',
196198
'pytest-xdist==3.5.0',
197199
'parameterized==0.9.0',
198200
"sbvirtualdisplay==1.3.0",
@@ -217,9 +219,9 @@
217219
# Usage: pytest --alluredir=allure_results
218220
# Serve: allure serve allure_results
219221
"allure": [
220-
'allure-pytest==2.13.2',
221-
'allure-python-commons==2.13.2',
222-
'allure-behave==2.13.2',
222+
'allure-pytest==2.13.3',
223+
'allure-python-commons==2.13.3',
224+
'allure-behave==2.13.3',
223225
],
224226
# pip install -e .[coverage]
225227
# Usage: coverage run -m pytest; coverage html; coverage report

0 commit comments

Comments
 (0)