seleniumbase 4.43.0__tar.gz → 4.43.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of seleniumbase might be problematic. Click here for more details.
- {seleniumbase-4.43.0/seleniumbase.egg-info → seleniumbase-4.43.1}/PKG-INFO +3 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/requirements.txt +2 -1
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/__version__.py +1 -1
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/behave/behave_sb.py +2 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_caseplans.py +2 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_mkchart.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_mkdir.py +21 -22
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_mkfile.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_mkpres.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_mkrec.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_objectify.py +2 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/browser_launcher.py +1 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/log_helper.py +3 -4
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/report_helper.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/sb_cdp.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/tour_helper.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/base_case.py +23 -24
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/page_actions.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/page_utils.py +2 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/basic_test_info.py +2 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/page_source.py +2 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/pytest_plugin.py +2 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/translator.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp_driver/connection.py +0 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/grid_hub.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/grid_node.py +2 -3
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_ide/convert_ide.py +1 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1/seleniumbase.egg-info}/PKG-INFO +3 -2
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase.egg-info/requires.txt +2 -1
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/setup.py +2 -1
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/.gitignore +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/LICENSE +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/MANIFEST.in +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/README.md +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/install.sh +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/pyproject.toml +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/pytest.ini +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/sbase/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/sbase/__main__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/sbase/steps.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/__main__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/behave/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/behave/behave_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/behave/steps.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/common/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/common/decorators.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/common/encryption.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/common/exceptions.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/common/obfuscate.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/common/unobfuscate.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/config/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/config/ad_block_list.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/config/proxy_list.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/config/settings.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/logo_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/rich_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/run.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_behave_gui.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_commander.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_install.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_print.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/console_scripts/sb_recorder.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/application_manager.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/capabilities_parser.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/colored_traceback.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/create_db_tables.sql +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/detect_b_ver.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/download_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/encoded_images.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/jqc_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/mysql.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/proxy_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/recorder_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/s3_manager.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/sb_driver.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/session_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/settings_parser.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/style_sheet.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/testcase_manager.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/core/visual_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/drivers/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/drivers/cft_drivers/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/drivers/chs_drivers/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/extensions/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/extensions/ad_block.zip +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/extensions/disable_csp.zip +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/extensions/recorder.zip +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/extensions/sbase_ext.zip +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/constants.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/css_to_xpath.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/errors.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/js_utils.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/shared_utils.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/unittest_helper.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/words.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/fixtures/xpath_to_css.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/js_code/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/js_code/active_css_js.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/js_code/live_js.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/js_code/recorder_js.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/masterqa/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/masterqa/master_qa.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/base_plugin.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/db_reporting_plugin.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/driver_manager.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/s3_logging_plugin.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/sb_manager.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/screen_shots.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/plugins/selenium_plugin.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/resources/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/chinese.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/dutch.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/french.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/italian.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/japanese.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/korean.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/master_dict.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/portuguese.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/russian.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/translate/spanish.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp_driver/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp_driver/_contradict.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp_driver/browser.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp_driver/cdp_util.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp_driver/config.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp_driver/element.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/cdp_driver/tab.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/dprocess.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/options.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/patcher.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/reactor.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/undetected/webelement.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/download_selenium_server.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/font_color +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/grid-hub +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/grid-node +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/register-grid-node.bat +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/register-grid-node.sh +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/start-grid-hub.bat +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_grid/start-grid-hub.sh +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase/utilities/selenium_ide/__init__.py +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase.egg-info/SOURCES.txt +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase.egg-info/dependency_links.txt +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase.egg-info/entry_points.txt +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/seleniumbase.egg-info/top_level.txt +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/setup.cfg +0 -0
- {seleniumbase-4.43.0 → seleniumbase-4.43.1}/virtualenv_install.sh +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seleniumbase
|
|
3
|
-
Version: 4.43.
|
|
3
|
+
Version: 4.43.1
|
|
4
4
|
Summary: A complete web automation framework for end-to-end testing.
|
|
5
5
|
Home-page: https://github.com/seleniumbase/SeleniumBase
|
|
6
6
|
Author: Michael Mintz
|
|
@@ -118,7 +118,8 @@ Requires-Dist: cssselect==1.2.0; python_version < "3.9"
|
|
|
118
118
|
Requires-Dist: cssselect==1.3.0; python_version >= "3.9"
|
|
119
119
|
Requires-Dist: sortedcontainers==2.4.0
|
|
120
120
|
Requires-Dist: execnet==2.1.1
|
|
121
|
-
Requires-Dist: iniconfig==2.1.0
|
|
121
|
+
Requires-Dist: iniconfig==2.1.0; python_version < "3.10"
|
|
122
|
+
Requires-Dist: iniconfig==2.3.0; python_version >= "3.10"
|
|
122
123
|
Requires-Dist: pluggy==1.5.0; python_version < "3.9"
|
|
123
124
|
Requires-Dist: pluggy==1.6.0; python_version >= "3.9"
|
|
124
125
|
Requires-Dist: pytest==8.3.5; python_version < "3.9"
|
|
@@ -57,7 +57,8 @@ cssselect==1.2.0;python_version<"3.9"
|
|
|
57
57
|
cssselect==1.3.0;python_version>="3.9"
|
|
58
58
|
sortedcontainers==2.4.0
|
|
59
59
|
execnet==2.1.1
|
|
60
|
-
iniconfig==2.1.0
|
|
60
|
+
iniconfig==2.1.0;python_version<"3.10"
|
|
61
|
+
iniconfig==2.3.0;python_version>="3.10"
|
|
61
62
|
pluggy==1.5.0;python_version<"3.9"
|
|
62
63
|
pluggy==1.6.0;python_version>="3.9"
|
|
63
64
|
pytest==8.3.5;python_version<"3.9"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# seleniumbase package
|
|
2
|
-
__version__ = "4.43.
|
|
2
|
+
__version__ = "4.43.1"
|
|
@@ -1205,7 +1205,6 @@ def dashboard_pre_processing():
|
|
|
1205
1205
|
|
|
1206
1206
|
|
|
1207
1207
|
def _create_dashboard_assets_():
|
|
1208
|
-
import codecs
|
|
1209
1208
|
from seleniumbase.js_code.live_js import live_js
|
|
1210
1209
|
from seleniumbase.core.style_sheet import get_pytest_style
|
|
1211
1210
|
|
|
@@ -1222,7 +1221,7 @@ def _create_dashboard_assets_():
|
|
|
1222
1221
|
if existing_pytest_style == get_pytest_style():
|
|
1223
1222
|
add_pytest_style_css = False
|
|
1224
1223
|
if add_pytest_style_css:
|
|
1225
|
-
out_file =
|
|
1224
|
+
out_file = open(pytest_style_css, "w+", encoding="utf-8")
|
|
1226
1225
|
out_file.writelines(get_pytest_style())
|
|
1227
1226
|
out_file.close()
|
|
1228
1227
|
live_js_file = os.path.join(assets_folder, "live.js")
|
|
@@ -1234,7 +1233,7 @@ def _create_dashboard_assets_():
|
|
|
1234
1233
|
if existing_live_js == live_js:
|
|
1235
1234
|
add_live_js_file = False
|
|
1236
1235
|
if add_live_js_file:
|
|
1237
|
-
out_file =
|
|
1236
|
+
out_file = open(live_js_file, "w+", encoding="utf-8")
|
|
1238
1237
|
out_file.writelines(live_js)
|
|
1239
1238
|
out_file.close()
|
|
1240
1239
|
|
|
@@ -15,7 +15,6 @@ Examples:
|
|
|
15
15
|
Output:
|
|
16
16
|
Launches the SeleniumBase Case Plans Generator.
|
|
17
17
|
"""
|
|
18
|
-
import codecs
|
|
19
18
|
import colorama
|
|
20
19
|
import os
|
|
21
20
|
import subprocess
|
|
@@ -135,7 +134,7 @@ def generate_case_plan_boilerplates(
|
|
|
135
134
|
file_name = case_id
|
|
136
135
|
file_path = os.path.join(full_folder_path, file_name)
|
|
137
136
|
if not os.path.exists(file_path):
|
|
138
|
-
out_file =
|
|
137
|
+
out_file = open(file_path, "w+", "utf-8")
|
|
139
138
|
out_file.writelines("\r\n".join(data))
|
|
140
139
|
out_file.close()
|
|
141
140
|
new_plans += 1
|
|
@@ -316,7 +315,7 @@ def view_summary_of_existing_case_plans(root, tests):
|
|
|
316
315
|
full_plan = plan_head
|
|
317
316
|
|
|
318
317
|
file_path = "case_summary.md"
|
|
319
|
-
file =
|
|
318
|
+
file = open(file_path, "w+", "utf-8")
|
|
320
319
|
file.writelines("\r\n".join(full_plan))
|
|
321
320
|
file.close()
|
|
322
321
|
|
|
@@ -22,7 +22,6 @@ Output:
|
|
|
22
22
|
and use a "sky" theme with "slide" transition.
|
|
23
23
|
The chart can be used as a basic boilerplate.
|
|
24
24
|
"""
|
|
25
|
-
import codecs
|
|
26
25
|
import colorama
|
|
27
26
|
import os
|
|
28
27
|
import sys
|
|
@@ -254,7 +253,7 @@ def main():
|
|
|
254
253
|
continue
|
|
255
254
|
new_data.append(line)
|
|
256
255
|
data = new_data
|
|
257
|
-
file =
|
|
256
|
+
file = open(file_path, "w+", "utf-8")
|
|
258
257
|
file.writelines("\r\n".join(data))
|
|
259
258
|
file.close()
|
|
260
259
|
if " " not in file_name:
|
|
@@ -18,7 +18,6 @@ Output:
|
|
|
18
18
|
and Python boilerplates for setting up customized
|
|
19
19
|
test frameworks.
|
|
20
20
|
"""
|
|
21
|
-
import codecs
|
|
22
21
|
import colorama
|
|
23
22
|
import os
|
|
24
23
|
import sys
|
|
@@ -114,7 +113,7 @@ def main():
|
|
|
114
113
|
data.append(seleniumbase_req)
|
|
115
114
|
data.append("")
|
|
116
115
|
file_path = "%s/%s" % (dir_name, "requirements.txt")
|
|
117
|
-
file =
|
|
116
|
+
file = open(file_path, "w+", "utf-8")
|
|
118
117
|
file.writelines("\r\n".join(data))
|
|
119
118
|
file.close()
|
|
120
119
|
|
|
@@ -152,7 +151,7 @@ def main():
|
|
|
152
151
|
data.append(" production: custom marker")
|
|
153
152
|
data.append("")
|
|
154
153
|
file_path = "%s/%s" % (dir_name, "pytest.ini")
|
|
155
|
-
file =
|
|
154
|
+
file = open(file_path, "w+", "utf-8")
|
|
156
155
|
file.writelines("\r\n".join(data))
|
|
157
156
|
file.close()
|
|
158
157
|
|
|
@@ -169,14 +168,14 @@ def main():
|
|
|
169
168
|
data.append("show_skipped=false")
|
|
170
169
|
data.append("show_timings=false")
|
|
171
170
|
file_path = "%s/%s" % (dir_name, "setup.cfg")
|
|
172
|
-
file =
|
|
171
|
+
file = open(file_path, "w+", "utf-8")
|
|
173
172
|
file.writelines("\r\n".join(data))
|
|
174
173
|
file.close()
|
|
175
174
|
|
|
176
175
|
data = []
|
|
177
176
|
data.append("")
|
|
178
177
|
file_path = "%s/%s" % (dir_name, "__init__.py")
|
|
179
|
-
file =
|
|
178
|
+
file = open(file_path, "w+", "utf-8")
|
|
180
179
|
file.writelines("\r\n".join(data))
|
|
181
180
|
file.close()
|
|
182
181
|
|
|
@@ -312,7 +311,7 @@ def main():
|
|
|
312
311
|
data.append("temp_*/")
|
|
313
312
|
data.append("node_modules")
|
|
314
313
|
file_path = "%s/%s" % (dir_name, ".gitignore")
|
|
315
|
-
file =
|
|
314
|
+
file = open(file_path, "w+", "utf-8")
|
|
316
315
|
file.writelines("\r\n".join(data))
|
|
317
316
|
file.close()
|
|
318
317
|
|
|
@@ -324,7 +323,7 @@ def main():
|
|
|
324
323
|
data.append(" ├── requirements.txt")
|
|
325
324
|
data.append(" └── setup.cfg")
|
|
326
325
|
file_path = "%s/%s" % (dir_name, "outline.rst")
|
|
327
|
-
file =
|
|
326
|
+
file = open(file_path, "w+", "utf-8")
|
|
328
327
|
file.writelines("\r\n".join(data))
|
|
329
328
|
file.close()
|
|
330
329
|
os.system("sbase print %s -n" % file_path)
|
|
@@ -368,7 +367,7 @@ def main():
|
|
|
368
367
|
data.append(' self.assert_element("div#login_button_container")')
|
|
369
368
|
data.append("")
|
|
370
369
|
file_path = "%s/%s" % (dir_name, "my_first_test.py")
|
|
371
|
-
file =
|
|
370
|
+
file = open(file_path, "w+", "utf-8")
|
|
372
371
|
file.writelines("\r\n".join(data))
|
|
373
372
|
file.close()
|
|
374
373
|
|
|
@@ -461,7 +460,7 @@ def main():
|
|
|
461
460
|
data.append(' self.assert_text("SeleniumBase", "h2")')
|
|
462
461
|
data.append("")
|
|
463
462
|
file_path = "%s/%s" % (dir_name, "test_demo_site.py")
|
|
464
|
-
file =
|
|
463
|
+
file = open(file_path, "w+", "utf-8")
|
|
465
464
|
file.writelines("\r\n".join(data))
|
|
466
465
|
file.close()
|
|
467
466
|
|
|
@@ -500,7 +499,7 @@ def main():
|
|
|
500
499
|
data.append(' self.assert_title_contains(title_text)')
|
|
501
500
|
data.append("")
|
|
502
501
|
file_path = "%s/%s" % (dir_name, "parameterized_test.py")
|
|
503
|
-
file =
|
|
502
|
+
file = open(file_path, "w+", "utf-8")
|
|
504
503
|
file.writelines("\r\n".join(data))
|
|
505
504
|
file.close()
|
|
506
505
|
|
|
@@ -510,7 +509,7 @@ def main():
|
|
|
510
509
|
data = []
|
|
511
510
|
data.append("")
|
|
512
511
|
file_path = "%s/%s" % (dir_name_2, "__init__.py")
|
|
513
|
-
file =
|
|
512
|
+
file = open(file_path, "w+", "utf-8")
|
|
514
513
|
file.writelines("\r\n".join(data))
|
|
515
514
|
file.close()
|
|
516
515
|
|
|
@@ -545,7 +544,7 @@ def main():
|
|
|
545
544
|
data.append(" pass")
|
|
546
545
|
data.append("")
|
|
547
546
|
file_path = "%s/%s" % (dir_name_2, "base_test_case.py")
|
|
548
|
-
file =
|
|
547
|
+
file = open(file_path, "w+", "utf-8")
|
|
549
548
|
file.writelines("\r\n".join(data))
|
|
550
549
|
file.close()
|
|
551
550
|
|
|
@@ -554,7 +553,7 @@ def main():
|
|
|
554
553
|
data.append(' html = "html"')
|
|
555
554
|
data.append("")
|
|
556
555
|
file_path = "%s/%s" % (dir_name_2, "page_objects.py")
|
|
557
|
-
file =
|
|
556
|
+
file = open(file_path, "w+", "utf-8")
|
|
558
557
|
file.writelines("\r\n".join(data))
|
|
559
558
|
file.close()
|
|
560
559
|
|
|
@@ -570,7 +569,7 @@ def main():
|
|
|
570
569
|
data.append(" self.assert_element(Page.html)")
|
|
571
570
|
data.append("")
|
|
572
571
|
file_path = "%s/%s" % (dir_name_2, "boilerplate_test.py")
|
|
573
|
-
file =
|
|
572
|
+
file = open(file_path, "w+", "utf-8")
|
|
574
573
|
file.writelines("\r\n".join(data))
|
|
575
574
|
file.close()
|
|
576
575
|
|
|
@@ -594,7 +593,7 @@ def main():
|
|
|
594
593
|
data.append(' DataPage().add_input_text(self, "Goodbye!")')
|
|
595
594
|
data.append("")
|
|
596
595
|
file_path = "%s/%s" % (dir_name_2, "classic_obj_test.py")
|
|
597
|
-
file =
|
|
596
|
+
file = open(file_path, "w+", "utf-8")
|
|
598
597
|
file.writelines("\r\n".join(data))
|
|
599
598
|
file.close()
|
|
600
599
|
|
|
@@ -614,7 +613,7 @@ def main():
|
|
|
614
613
|
data.append(' DataPage().add_input_text(sb, "Goodbye!")')
|
|
615
614
|
data.append("")
|
|
616
615
|
file_path = "%s/%s" % (dir_name_2, "sb_fixture_test.py")
|
|
617
|
-
file =
|
|
616
|
+
file = open(file_path, "w+", "utf-8")
|
|
618
617
|
file.writelines("\r\n".join(data))
|
|
619
618
|
file.close()
|
|
620
619
|
|
|
@@ -624,7 +623,7 @@ def main():
|
|
|
624
623
|
data = []
|
|
625
624
|
data.append("")
|
|
626
625
|
file_path = "%s/%s" % (dir_name_3, "__init__.py")
|
|
627
|
-
file =
|
|
626
|
+
file = open(file_path, "w+", "utf-8")
|
|
628
627
|
file.writelines("\r\n".join(data))
|
|
629
628
|
file.close()
|
|
630
629
|
|
|
@@ -652,7 +651,7 @@ def main():
|
|
|
652
651
|
)
|
|
653
652
|
data.append("")
|
|
654
653
|
file_path = "%s/%s" % (dir_name_3, "google_test.py")
|
|
655
|
-
file =
|
|
654
|
+
file = open(file_path, "w+", "utf-8")
|
|
656
655
|
file.writelines("\r\n".join(data))
|
|
657
656
|
file.close()
|
|
658
657
|
|
|
@@ -670,7 +669,7 @@ def main():
|
|
|
670
669
|
data.append(' search_results = "div#center_col"')
|
|
671
670
|
data.append("")
|
|
672
671
|
file_path = "%s/%s" % (dir_name_3, "google_objects.py")
|
|
673
|
-
file =
|
|
672
|
+
file = open(file_path, "w+", "utf-8")
|
|
674
673
|
file.writelines("\r\n".join(data))
|
|
675
674
|
file.close()
|
|
676
675
|
|
|
@@ -702,7 +701,7 @@ def main():
|
|
|
702
701
|
data.append(' self.assert_element("div#login_button_container")')
|
|
703
702
|
data.append("")
|
|
704
703
|
file_path = "%s/%s" % (dir_name_3, "swag_labs_test.py")
|
|
705
|
-
file =
|
|
704
|
+
file = open(file_path, "w+", "utf-8")
|
|
706
705
|
file.writelines("\r\n".join(data))
|
|
707
706
|
file.close()
|
|
708
707
|
|
|
@@ -729,7 +728,7 @@ def main():
|
|
|
729
728
|
data.append(' sb.assert_element("div#login_button_container")')
|
|
730
729
|
data.append("")
|
|
731
730
|
file_path = "%s/%s" % (dir_name_3, "sb_swag_test.py")
|
|
732
|
-
file =
|
|
731
|
+
file = open(file_path, "w+", "utf-8")
|
|
733
732
|
file.writelines("\r\n".join(data))
|
|
734
733
|
file.close()
|
|
735
734
|
|
|
@@ -756,7 +755,7 @@ def main():
|
|
|
756
755
|
data.append(" ├── sb_swag_test.py")
|
|
757
756
|
data.append(" └── swag_labs_test.py")
|
|
758
757
|
file_path = "%s/%s" % (dir_name, "outline.rst")
|
|
759
|
-
file =
|
|
758
|
+
file = open(file_path, "w+", "utf-8")
|
|
760
759
|
file.writelines("\r\n".join(data))
|
|
761
760
|
file.close()
|
|
762
761
|
if " " not in file_path:
|
|
@@ -40,7 +40,6 @@ Output:
|
|
|
40
40
|
BaseCase format supports Languages or Recorder Mode.
|
|
41
41
|
UC Mode automatically uses English with SB() format.
|
|
42
42
|
"""
|
|
43
|
-
import codecs
|
|
44
43
|
import colorama
|
|
45
44
|
import os
|
|
46
45
|
import sys
|
|
@@ -413,7 +412,7 @@ def main():
|
|
|
413
412
|
continue
|
|
414
413
|
new_data.append(line)
|
|
415
414
|
data = new_data
|
|
416
|
-
file =
|
|
415
|
+
file = open(file_path, "w+", "utf-8")
|
|
417
416
|
file.writelines("\r\n".join(data))
|
|
418
417
|
file.close()
|
|
419
418
|
if " " not in file_name:
|
|
@@ -22,7 +22,6 @@ Output:
|
|
|
22
22
|
and use "serif" theme with "slide" transition.
|
|
23
23
|
The slides can be used as a basic boilerplate.
|
|
24
24
|
"""
|
|
25
|
-
import codecs
|
|
26
25
|
import colorama
|
|
27
26
|
import os
|
|
28
27
|
import sys
|
|
@@ -273,7 +272,7 @@ def main():
|
|
|
273
272
|
continue
|
|
274
273
|
new_data.append(line)
|
|
275
274
|
data = new_data
|
|
276
|
-
file =
|
|
275
|
+
file = open(file_path, "w+", "utf-8")
|
|
277
276
|
file.writelines("\r\n".join(data))
|
|
278
277
|
file.close()
|
|
279
278
|
if " " not in file_name:
|
|
@@ -29,7 +29,6 @@ Output:
|
|
|
29
29
|
Creates a new SeleniumBase test using the Recorder.
|
|
30
30
|
If the filename already exists, an error is raised.
|
|
31
31
|
"""
|
|
32
|
-
import codecs
|
|
33
32
|
import colorama
|
|
34
33
|
import shutil
|
|
35
34
|
import os
|
|
@@ -240,7 +239,7 @@ def main():
|
|
|
240
239
|
d2.append("")
|
|
241
240
|
data = d2
|
|
242
241
|
|
|
243
|
-
file =
|
|
242
|
+
file = open(file_path, "w+", "utf-8")
|
|
244
243
|
file.writelines("\r\n".join(data))
|
|
245
244
|
file.close()
|
|
246
245
|
success = (
|
|
@@ -8,7 +8,6 @@ Output:
|
|
|
8
8
|
have been replaced with variable names defined in
|
|
9
9
|
"page_objects.py", supporting the Page Object Pattern.
|
|
10
10
|
"""
|
|
11
|
-
import codecs
|
|
12
11
|
import os
|
|
13
12
|
import re
|
|
14
13
|
import sys
|
|
@@ -136,7 +135,7 @@ def create_objects_file(selector_list_dict=None):
|
|
|
136
135
|
data.append(' html = "html"')
|
|
137
136
|
data.append("")
|
|
138
137
|
file_path = PAGE_OBJECTS_FILE
|
|
139
|
-
file =
|
|
138
|
+
file = open(file_path, "w+", "utf-8")
|
|
140
139
|
file.writelines("\r\n".join(data))
|
|
141
140
|
file.close()
|
|
142
141
|
if not selector_list_dict:
|
|
@@ -3189,7 +3188,7 @@ def main(shell_command):
|
|
|
3189
3188
|
# Create SeleniumBase test file
|
|
3190
3189
|
base_file_name = seleniumbase_file.split(".py")[0]
|
|
3191
3190
|
converted_file_name = base_file_name + ".py" # Change end to make a copy
|
|
3192
|
-
out_file =
|
|
3191
|
+
out_file = open(converted_file_name, "w+", encoding="utf-8")
|
|
3193
3192
|
out_file.writelines(seleniumbase_code)
|
|
3194
3193
|
out_file.close()
|
|
3195
3194
|
print('\n>>> ["%s"] was updated!\n' % converted_file_name)
|
|
@@ -2006,14 +2006,12 @@ def _repair_edgedriver(edge_version):
|
|
|
2006
2006
|
|
|
2007
2007
|
|
|
2008
2008
|
def _mark_driver_repaired():
|
|
2009
|
-
import codecs
|
|
2010
|
-
|
|
2011
2009
|
abs_path = os.path.abspath(".")
|
|
2012
2010
|
driver_repaired_lock = constants.MultiBrowser.DRIVER_REPAIRED
|
|
2013
2011
|
file_path = os.path.join(abs_path, driver_repaired_lock)
|
|
2014
2012
|
if not os.path.exists(DOWNLOADS_FOLDER):
|
|
2015
2013
|
os.makedirs(DOWNLOADS_FOLDER)
|
|
2016
|
-
out_file =
|
|
2014
|
+
out_file = open(file_path, "w+", encoding="utf-8")
|
|
2017
2015
|
out_file.writelines("")
|
|
2018
2016
|
out_file.close()
|
|
2019
2017
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import codecs
|
|
2
1
|
import os
|
|
3
2
|
import shutil
|
|
4
3
|
import sys
|
|
@@ -298,7 +297,7 @@ def log_test_failure_data(test, test_logpath, driver, browser, url=None):
|
|
|
298
297
|
with suppress(Exception):
|
|
299
298
|
os.makedirs(test_logpath)
|
|
300
299
|
with suppress(Exception):
|
|
301
|
-
log_file =
|
|
300
|
+
log_file = open(basic_file_path, "w+", encoding="utf-8")
|
|
302
301
|
log_file.writelines("\r\n".join(data_to_save))
|
|
303
302
|
log_file.close()
|
|
304
303
|
shared_utils.make_writable(basic_file_path)
|
|
@@ -353,7 +352,7 @@ def log_skipped_test_data(test, test_logpath, driver, browser, reason):
|
|
|
353
352
|
data_to_save.append("")
|
|
354
353
|
file_path = os.path.join(test_logpath, "skip_reason.txt")
|
|
355
354
|
with suppress(Exception):
|
|
356
|
-
log_file =
|
|
355
|
+
log_file = open(file_path, "w+", encoding="utf-8")
|
|
357
356
|
log_file.writelines("\r\n".join(data_to_save))
|
|
358
357
|
log_file.close()
|
|
359
358
|
shared_utils.make_writable(file_path)
|
|
@@ -388,7 +387,7 @@ def log_page_source(test_logpath, driver, source=None):
|
|
|
388
387
|
os.makedirs(test_logpath)
|
|
389
388
|
html_file_path = os.path.join(test_logpath, html_file_name)
|
|
390
389
|
with suppress(Exception):
|
|
391
|
-
html_file =
|
|
390
|
+
html_file = open(html_file_path, "w+", encoding="utf-8")
|
|
392
391
|
html_file.write(page_source)
|
|
393
392
|
html_file.close()
|
|
394
393
|
shared_utils.make_writable(html_file_path)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import codecs
|
|
2
1
|
import os
|
|
3
2
|
import shutil
|
|
4
3
|
import sys
|
|
@@ -48,7 +47,7 @@ def save_test_failure_data(test, name, folder=None):
|
|
|
48
47
|
failure_data_file_path = os.path.join(file_path, name)
|
|
49
48
|
else:
|
|
50
49
|
failure_data_file_path = name
|
|
51
|
-
failure_data_file =
|
|
50
|
+
failure_data_file = open(failure_data_file_path, "w+", "utf-8")
|
|
52
51
|
data_to_save = []
|
|
53
52
|
if not hasattr(sb_config, "_report_test_id"):
|
|
54
53
|
exc_message = "(Unknown Exception)"
|
|
@@ -2669,7 +2669,6 @@ class CDPMethods():
|
|
|
2669
2669
|
self.loop.run_until_complete(self.page.wait())
|
|
2670
2670
|
|
|
2671
2671
|
def save_page_source(self, name, folder=None):
|
|
2672
|
-
import codecs
|
|
2673
2672
|
from seleniumbase.core import log_helper
|
|
2674
2673
|
if not name.endswith(".html"):
|
|
2675
2674
|
name = name + ".html"
|
|
@@ -2695,7 +2694,7 @@ class CDPMethods():
|
|
|
2695
2694
|
rendered_source = "%s\n%s" % (base_href_html, page_source)
|
|
2696
2695
|
else:
|
|
2697
2696
|
rendered_source = page_source
|
|
2698
|
-
html_file =
|
|
2697
|
+
html_file = open(html_file_path, "w+", "utf-8")
|
|
2699
2698
|
html_file.write(rendered_source)
|
|
2700
2699
|
html_file.close()
|
|
2701
2700
|
|
|
@@ -1134,10 +1134,9 @@ def export_tour(tour_steps, name=None, filename="my_tour.js", url=None):
|
|
|
1134
1134
|
os.makedirs(exported_tours_folder)
|
|
1135
1135
|
except Exception:
|
|
1136
1136
|
pass
|
|
1137
|
-
import codecs
|
|
1138
1137
|
|
|
1139
1138
|
file_path = exported_tours_folder + "/" + filename
|
|
1140
|
-
out_file =
|
|
1139
|
+
out_file = open(file_path, "w+", encoding="utf-8")
|
|
1141
1140
|
out_file.writelines(instructions)
|
|
1142
1141
|
out_file.close()
|
|
1143
1142
|
print("\n>>> [%s] was saved!\n" % file_path)
|
|
@@ -32,7 +32,6 @@ Improvements include making WebDriver more robust, reliable, and flexible.
|
|
|
32
32
|
Page elements are given enough time to load before WebDriver acts on them.
|
|
33
33
|
Code becomes greatly simplified and easier to maintain."""
|
|
34
34
|
|
|
35
|
-
import codecs
|
|
36
35
|
import colorama
|
|
37
36
|
import fasteners
|
|
38
37
|
import json
|
|
@@ -4683,7 +4682,7 @@ class BaseCase(unittest.TestCase):
|
|
|
4683
4682
|
if not os.path.exists(file_path):
|
|
4684
4683
|
os.makedirs(file_path)
|
|
4685
4684
|
cookies_file_path = os.path.join(file_path, name)
|
|
4686
|
-
cookies_file =
|
|
4685
|
+
cookies_file = open(cookies_file_path, "w+", encoding="utf-8")
|
|
4687
4686
|
cookies_file.writelines(json_cookies)
|
|
4688
4687
|
cookies_file.close()
|
|
4689
4688
|
|
|
@@ -5737,7 +5736,7 @@ class BaseCase(unittest.TestCase):
|
|
|
5737
5736
|
extra_file_name = "__init__.py"
|
|
5738
5737
|
extra_file_path = os.path.join(recordings_folder, extra_file_name)
|
|
5739
5738
|
if not os.path.exists(extra_file_path):
|
|
5740
|
-
out_file =
|
|
5739
|
+
out_file = open(extra_file_path, "w+", "utf-8")
|
|
5741
5740
|
out_file.writelines("\r\n".join(data))
|
|
5742
5741
|
out_file.close()
|
|
5743
5742
|
sys.stdout.write("\nCreated recordings%s__init__.py" % os.sep)
|
|
@@ -5785,7 +5784,7 @@ class BaseCase(unittest.TestCase):
|
|
|
5785
5784
|
extra_file_name = "pytest.ini"
|
|
5786
5785
|
extra_file_path = os.path.join(recordings_folder, extra_file_name)
|
|
5787
5786
|
if not os.path.exists(extra_file_path):
|
|
5788
|
-
out_file =
|
|
5787
|
+
out_file = open(extra_file_path, "w+", "utf-8")
|
|
5789
5788
|
out_file.writelines("\r\n".join(data))
|
|
5790
5789
|
out_file.close()
|
|
5791
5790
|
sys.stdout.write("\nCreated recordings%spytest.ini" % os.sep)
|
|
@@ -5806,7 +5805,7 @@ class BaseCase(unittest.TestCase):
|
|
|
5806
5805
|
extra_file_name = "setup.cfg"
|
|
5807
5806
|
extra_file_path = os.path.join(recordings_folder, extra_file_name)
|
|
5808
5807
|
if not os.path.exists(extra_file_path):
|
|
5809
|
-
out_file =
|
|
5808
|
+
out_file = open(extra_file_path, "w+", "utf-8")
|
|
5810
5809
|
out_file.writelines("\r\n".join(data))
|
|
5811
5810
|
out_file.close()
|
|
5812
5811
|
sys.stdout.write("\nCreated recordings%ssetup.cfg" % os.sep)
|
|
@@ -5824,7 +5823,7 @@ class BaseCase(unittest.TestCase):
|
|
|
5824
5823
|
elif context_filename:
|
|
5825
5824
|
file_name = context_filename
|
|
5826
5825
|
file_path = os.path.join(recordings_folder, file_name)
|
|
5827
|
-
out_file =
|
|
5826
|
+
out_file = open(file_path, "w+", "utf-8")
|
|
5828
5827
|
out_file.writelines("\r\n".join(data))
|
|
5829
5828
|
out_file.close()
|
|
5830
5829
|
rec_message = ">>> RECORDING SAVED as: "
|
|
@@ -5926,7 +5925,7 @@ class BaseCase(unittest.TestCase):
|
|
|
5926
5925
|
file_name = sb_config.behave_scenario.filename.replace(".", "_")
|
|
5927
5926
|
file_name = file_name.split("/")[-1].split("\\")[-1] + "_rec.feature"
|
|
5928
5927
|
file_path = os.path.join(features_folder, file_name)
|
|
5929
|
-
out_file =
|
|
5928
|
+
out_file = open(file_path, "w+", "utf-8")
|
|
5930
5929
|
out_file.writelines("\r\n".join(data))
|
|
5931
5930
|
out_file.close()
|
|
5932
5931
|
|
|
@@ -5964,7 +5963,7 @@ class BaseCase(unittest.TestCase):
|
|
|
5964
5963
|
file_name = "__init__.py"
|
|
5965
5964
|
file_path = os.path.join(features_folder, file_name)
|
|
5966
5965
|
if not os.path.exists(file_path):
|
|
5967
|
-
out_file =
|
|
5966
|
+
out_file = open(file_path, "w+", "utf-8")
|
|
5968
5967
|
out_file.writelines("\r\n".join(data))
|
|
5969
5968
|
out_file.close()
|
|
5970
5969
|
print("Created recordings/features/__init__.py")
|
|
@@ -5977,7 +5976,7 @@ class BaseCase(unittest.TestCase):
|
|
|
5977
5976
|
file_name = "behave.ini"
|
|
5978
5977
|
file_path = os.path.join(features_folder, file_name)
|
|
5979
5978
|
if not os.path.exists(file_path):
|
|
5980
|
-
out_file =
|
|
5979
|
+
out_file = open(file_path, "w+", "utf-8")
|
|
5981
5980
|
out_file.writelines("\r\n".join(data))
|
|
5982
5981
|
out_file.close()
|
|
5983
5982
|
print("Created recordings/features/behave.ini")
|
|
@@ -6016,7 +6015,7 @@ class BaseCase(unittest.TestCase):
|
|
|
6016
6015
|
file_name = "environment.py"
|
|
6017
6016
|
file_path = os.path.join(features_folder, file_name)
|
|
6018
6017
|
if not os.path.exists(file_path):
|
|
6019
|
-
out_file =
|
|
6018
|
+
out_file = open(file_path, "w+", "utf-8")
|
|
6020
6019
|
out_file.writelines("\r\n".join(data))
|
|
6021
6020
|
out_file.close()
|
|
6022
6021
|
print("Created recordings/features/environment.py")
|
|
@@ -6026,7 +6025,7 @@ class BaseCase(unittest.TestCase):
|
|
|
6026
6025
|
file_name = "__init__.py"
|
|
6027
6026
|
file_path = os.path.join(steps_folder, file_name)
|
|
6028
6027
|
if not os.path.exists(file_path):
|
|
6029
|
-
out_file =
|
|
6028
|
+
out_file = open(file_path, "w+", "utf-8")
|
|
6030
6029
|
out_file.writelines("\r\n".join(data))
|
|
6031
6030
|
out_file.close()
|
|
6032
6031
|
print("Created recordings/features/steps/__init__.py")
|
|
@@ -6037,7 +6036,7 @@ class BaseCase(unittest.TestCase):
|
|
|
6037
6036
|
file_name = "imported.py"
|
|
6038
6037
|
file_path = os.path.join(steps_folder, file_name)
|
|
6039
6038
|
if not os.path.exists(file_path):
|
|
6040
|
-
out_file =
|
|
6039
|
+
out_file = open(file_path, "w+", "utf-8")
|
|
6041
6040
|
out_file.writelines("\r\n".join(data))
|
|
6042
6041
|
out_file.close()
|
|
6043
6042
|
print("Created recordings/features/steps/imported.py")
|
|
@@ -11078,7 +11077,7 @@ class BaseCase(unittest.TestCase):
|
|
|
11078
11077
|
return # Skip the rest when deferred visual asserts are used
|
|
11079
11078
|
the_html = visual_helper.get_sbs_html()
|
|
11080
11079
|
file_path = os.path.join(test_logpath, constants.SideBySide.HTML_FILE)
|
|
11081
|
-
out_file =
|
|
11080
|
+
out_file = open(file_path, "w+", encoding="utf-8")
|
|
11082
11081
|
out_file.writelines(the_html)
|
|
11083
11082
|
out_file.close()
|
|
11084
11083
|
|
|
@@ -11238,16 +11237,16 @@ class BaseCase(unittest.TestCase):
|
|
|
11238
11237
|
self.save_screenshot(
|
|
11239
11238
|
baseline_png, visual_baseline_path, selector="body"
|
|
11240
11239
|
)
|
|
11241
|
-
out_file =
|
|
11240
|
+
out_file = open(page_url_file, "w+", encoding="utf-8")
|
|
11242
11241
|
out_file.writelines(page_url)
|
|
11243
11242
|
out_file.close()
|
|
11244
|
-
out_file =
|
|
11243
|
+
out_file = open(level_1_file, "w+", encoding="utf-8")
|
|
11245
11244
|
out_file.writelines(json.dumps(level_1))
|
|
11246
11245
|
out_file.close()
|
|
11247
|
-
out_file =
|
|
11246
|
+
out_file = open(level_2_file, "w+", encoding="utf-8")
|
|
11248
11247
|
out_file.writelines(json.dumps(level_2))
|
|
11249
11248
|
out_file.close()
|
|
11250
|
-
out_file =
|
|
11249
|
+
out_file = open(level_3_file, "w+", encoding="utf-8")
|
|
11251
11250
|
out_file.writelines(json.dumps(level_3))
|
|
11252
11251
|
out_file.close()
|
|
11253
11252
|
|
|
@@ -11386,7 +11385,7 @@ class BaseCase(unittest.TestCase):
|
|
|
11386
11385
|
alpha_n_d_name = "".join([x if x.isalnum() else "_" for x in name])
|
|
11387
11386
|
side_by_side_name = "side_by_side_%s.html" % alpha_n_d_name
|
|
11388
11387
|
file_path = os.path.join(test_logpath, side_by_side_name)
|
|
11389
|
-
out_file =
|
|
11388
|
+
out_file = open(file_path, "w+", encoding="utf-8")
|
|
11390
11389
|
out_file.writelines(the_html)
|
|
11391
11390
|
out_file.close()
|
|
11392
11391
|
|
|
@@ -12071,7 +12070,7 @@ class BaseCase(unittest.TestCase):
|
|
|
12071
12070
|
with suppress(Exception):
|
|
12072
12071
|
os.makedirs(saved_presentations_folder)
|
|
12073
12072
|
file_path = os.path.join(saved_presentations_folder, filename)
|
|
12074
|
-
out_file =
|
|
12073
|
+
out_file = open(file_path, "w+", encoding="utf-8")
|
|
12075
12074
|
out_file.writelines(the_html)
|
|
12076
12075
|
out_file.close()
|
|
12077
12076
|
if self._output_file_saves:
|
|
@@ -12766,7 +12765,7 @@ class BaseCase(unittest.TestCase):
|
|
|
12766
12765
|
with suppress(Exception):
|
|
12767
12766
|
os.makedirs(saved_charts_folder)
|
|
12768
12767
|
file_path = os.path.join(saved_charts_folder, filename)
|
|
12769
|
-
out_file =
|
|
12768
|
+
out_file = open(file_path, "w+", encoding="utf-8")
|
|
12770
12769
|
out_file.writelines(the_html)
|
|
12771
12770
|
out_file.close()
|
|
12772
12771
|
if self._output_file_saves:
|
|
@@ -16048,7 +16047,7 @@ class BaseCase(unittest.TestCase):
|
|
|
16048
16047
|
test_id = test_id.replace(".py::", ".").replace("::", ".")
|
|
16049
16048
|
test_id = test_id.replace("/", ".").replace("\\", ".")
|
|
16050
16049
|
test_id = test_id.replace(" ", "_")
|
|
16051
|
-
# Linux filename length limit for `
|
|
16050
|
+
# Linux filename length limit for `open(filename)` = 255
|
|
16052
16051
|
# 255 - len("latest_logs/") - len("/basic_test_info.txt") = 223
|
|
16053
16052
|
if len(test_id) <= 223:
|
|
16054
16053
|
return test_id
|
|
@@ -16326,7 +16325,7 @@ class BaseCase(unittest.TestCase):
|
|
|
16326
16325
|
dash_pie = json.dumps(sb_config._saved_dashboard_pie)
|
|
16327
16326
|
dash_pie_loc = constants.Dashboard.DASH_PIE
|
|
16328
16327
|
pie_path = os.path.join(abs_path, dash_pie_loc)
|
|
16329
|
-
pie_file =
|
|
16328
|
+
pie_file = open(pie_path, "w+", encoding="utf-8")
|
|
16330
16329
|
pie_file.writelines(dash_pie)
|
|
16331
16330
|
pie_file.close()
|
|
16332
16331
|
DASH_PIE_PNG_1 = constants.Dashboard.get_dash_pie_1()
|
|
@@ -16486,7 +16485,7 @@ class BaseCase(unittest.TestCase):
|
|
|
16486
16485
|
)
|
|
16487
16486
|
abs_path = os.path.abspath(".")
|
|
16488
16487
|
file_path = os.path.join(abs_path, "dashboard.html")
|
|
16489
|
-
out_file =
|
|
16488
|
+
out_file = open(file_path, "w+", encoding="utf-8")
|
|
16490
16489
|
out_file.writelines(the_html)
|
|
16491
16490
|
out_file.close()
|
|
16492
16491
|
sb_config._dash_html = the_html
|
|
@@ -16499,7 +16498,7 @@ class BaseCase(unittest.TestCase):
|
|
|
16499
16498
|
dash_json = json.dumps((_results, _display_id, _rt, _tlp, d_stats))
|
|
16500
16499
|
dash_json_loc = constants.Dashboard.DASH_JSON
|
|
16501
16500
|
dash_jsonpath = os.path.join(abs_path, dash_json_loc)
|
|
16502
|
-
dash_json_file =
|
|
16501
|
+
dash_json_file = open(dash_jsonpath, "w+", encoding="utf-8")
|
|
16503
16502
|
dash_json_file.writelines(dash_json)
|
|
16504
16503
|
dash_json_file.close()
|
|
16505
16504
|
|