Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Framework/MainDriverApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ def run_test_case(
shared.Set_Shared_Variables("zeuz_prettify_limit", 500)
CommonUtil.prettify_limit = 500

shared.Set_Shared_Variables("zeuz_tc_logs", {"errors": []}, pretty=False, print_variable=False)
shared.Set_Shared_Variables("zeuz_attachments_dir", (Path(temp_ini_file).parent/"attachments").__str__())
if not shared.Test_Shared_Variables("element_wait"):
shared.Set_Shared_Variables("element_wait", 10)
Expand Down
21 changes: 21 additions & 0 deletions Framework/Utilities/CommonUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,27 @@ def ExecLog(
# Except the browser logs
global all_logs, all_logs_count, all_logs_list

# Append the errors in the zeuz_tc_logs
if iLogLevel == 3:
try:
from Framework.Built_In_Automation.Shared_Resources import BuiltInFunctionSharedResources as shared
zeuz_tc_logs = shared.Get_Shared_Variables("zeuz_tc_logs")
if zeuz_tc_logs and isinstance(zeuz_tc_logs, dict):
now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
error_entry = {
"step": int(current_step_no),
"action": int(current_action_no),
"module": sModuleInfo,
"message": sDetails,
"test_case_id": current_tc_no,
"timestamp": now
}
zeuz_tc_logs["errors"].append(error_entry)
shared.Set_Shared_Variables("zeuz_tc_logs", zeuz_tc_logs, print_variable=False, pretty=False)
except:
pass


log_id = ConfigModule.get_config_value(
"sectionOne", "sTestStepExecLogId", temp_config
)
Expand Down