Skip to content

APP-314 fix. Workflow now highlights asserts, presses, text fields etc as intended#273

Open
chinmayajha wants to merge 1 commit intomozarkai:mainfrom
chinmayajha:timestamp-fix-windows
Open

APP-314 fix. Workflow now highlights asserts, presses, text fields etc as intended#273
chinmayajha wants to merge 1 commit intomozarkai:mainfrom
chinmayajha:timestamp-fix-windows

Conversation

@chinmayajha
Copy link
Copy Markdown
Contributor

Fix to https://mozarkai-orchestrator.atlassian.net/browse/APP-314

Workflow already handled annotations, but the problem was in saving of the image. Commit fixes invalid timestamp format causing screenshot save failure (on windows)

changes file saving behaviour, fixes workflow

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

@thakur-patel thakur-patel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the change to highlight elements? I only see a timestamp filename change done in this PR

current_time_in_desired_timezone = current_utc_time.astimezone(desired_timezone)
formatted_time = current_time_in_desired_timezone.strftime("%Y-%m-%dT%H:%M:%S.%f%z")
return formatted_time[:-2] + ":" + formatted_time[-2:]
ist = timezone(timedelta(hours=5, minutes=30))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not hardcode timezones

internal_logger.debug(f"Screenshot saved as : {time_stamp}-{name}.jpg")
internal_logger.debug(f"Screenshot saved to :{screenshot_file_path}")
else:
internal_logger.error(f"cv2 returned FALSE. FAILED to save screenshot to : {screenshot_file_path}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this error will not give context to a developer new to this repo, we can improve it

@chinmayajha
Copy link
Copy Markdown
Contributor Author

chinmayajha commented Apr 7, 2026

Where is the change to highlight elements? I only see a timestamp filename change done in this PR

The highlights were already being handled. Issue was the filename (which had the timstamp) being invalid, thus the screenshot not getting saved. I just made the function a bit better.

do not hardcode timezones

Noted. will commit another change.

this error will not give context to a developer new to this repo, we can improve it

OKay, I'll see what I can do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants