|
68 | 68 | -D use-auto-ext (Use Chrome's automation extension.) |
69 | 69 | -D remote-debug (Enable Chrome's Remote Debugger on http://localhost:9222) |
70 | 70 | -D dashboard (Enable the SeleniumBase Dashboard. Saved at: dashboard.html) |
| 71 | +-D dash-title=STRING (Set the title shown for the generated dashboard.) |
71 | 72 | -D swiftshader (Use Chrome's "--use-gl=swiftshader" feature.) |
72 | 73 | -D incognito (Enable Chrome's Incognito mode.) |
73 | 74 | -D guest (Enable Chrome's Guest mode.) |
@@ -177,6 +178,7 @@ def get_configured_sb(context): |
177 | 178 | sb.time_limit = None |
178 | 179 | sb.demo_sleep = None |
179 | 180 | sb.dashboard = False |
| 181 | + sb.dash_title = None |
180 | 182 | sb._dash_initialized = False |
181 | 183 | sb.message_duration = None |
182 | 184 | sb.block_images = False |
@@ -537,6 +539,10 @@ def get_configured_sb(context): |
537 | 539 | if low_key == "dashboard": |
538 | 540 | sb.dashboard = True |
539 | 541 | continue |
| 542 | + # Handle: -D dash-title=TITLE / dash_title=TITLE |
| 543 | + if low_key in ["dash-title", "dash_title"]: |
| 544 | + sb.dash_title = userdata[key] |
| 545 | + continue |
540 | 546 | # Handle: -D message-duration / message_duration |
541 | 547 | if low_key in ["message-duration", "message_duration"]: |
542 | 548 | message_duration = userdata[key] |
@@ -689,9 +695,14 @@ def get_configured_sb(context): |
689 | 695 | sb.protocol = "https" |
690 | 696 |
|
691 | 697 | # Set sb_config |
| 698 | + sb_config.browser = sb.browser |
| 699 | + sb_config.headless = sb.headless |
| 700 | + sb_config.headed = sb.headed |
| 701 | + sb_config.xvfb = sb.xvfb |
692 | 702 | sb_config.save_screenshot = sb.save_screenshot_after_test |
693 | 703 | sb_config.variables = sb.variables |
694 | 704 | sb_config.dashboard = sb.dashboard |
| 705 | + sb_config.dash_title = sb.dash_title |
695 | 706 | sb_config.pdb_option = sb.pdb_option |
696 | 707 | sb_config.rec_behave = sb.rec_behave |
697 | 708 | sb_config.record_sleep = sb.record_sleep |
@@ -720,6 +731,9 @@ def get_configured_sb(context): |
720 | 731 | sb_config._dash_final_summary = None # Dash status to add to html report |
721 | 732 | sb_config._html_report_name = None # The name of the pytest html report |
722 | 733 |
|
| 734 | + if sb_config.dash_title: |
| 735 | + constants.Dashboard.TITLE = sb_config.dash_title.replace("_", " ") |
| 736 | + |
723 | 737 | log_helper.log_folder_setup(sb.log_path, sb.archive_logs) |
724 | 738 | download_helper.reset_downloads_folder() |
725 | 739 | proxy_helper.remove_proxy_zip_if_present() |
@@ -799,7 +813,11 @@ def dashboard_pre_processing(): |
799 | 813 | filename = None |
800 | 814 | feature_name = None |
801 | 815 | scenario_name = None |
802 | | - for row in output.decode("utf-8").split("\n"): |
| 816 | + if is_windows: |
| 817 | + output = output.decode("latin1") |
| 818 | + else: |
| 819 | + output = output.decode("utf-8") |
| 820 | + for row in output.replace("\r", "").split("\n"): |
803 | 821 | if row.startswith("Feature: "): |
804 | 822 | filename_count += 1 |
805 | 823 | feature_count += 1 |
|
0 commit comments