Skip to content

Commit 1d1e862

Browse files
committed
Path refactoring with the correct separator per OS
1 parent d675acf commit 1d1e862

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

seleniumbase/behave/behave_sb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def get_configured_sb(context):
158158
sb.extension_dir = None
159159
sb.page_load_strategy = None
160160
sb.database_env = "test"
161-
sb.log_path = "latest_logs/"
161+
sb.log_path = "latest_logs" + os.sep
162162
sb.archive_logs = False
163163
sb.disable_csp = False
164164
sb.disable_ws = False
@@ -1122,8 +1122,8 @@ def do_final_driver_cleanup_as_needed():
11221122

11231123

11241124
def _perform_behave_terminal_summary_():
1125-
latest_logs_dir = os.getcwd() + "/latest_logs/"
1126-
dash_path = os.getcwd() + "/dashboard.html"
1125+
latest_logs_dir = os.path.join(os.getcwd(), "latest_logs" + os.sep)
1126+
dash_path = os.path.join(os.getcwd(), "dashboard.html")
11271127
equals_len = len("Dashboard: ") + len(dash_path)
11281128
try:
11291129
terminal_size = os.get_terminal_size().columns

seleniumbase/fixtures/base_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5945,7 +5945,7 @@ def save_element_as_image_file(
59455945
file_name = file_name + ".png"
59465946
image_file_path = None
59475947
if folder:
5948-
if folder.endswith("/"):
5948+
if folder.endswith(os.sep):
59495949
folder = folder[:-1]
59505950
if len(folder) > 0:
59515951
self.create_folder(folder)

0 commit comments

Comments
 (0)