Skip to content

Commit

Permalink
refactor: Use a more readable datetime string format
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed May 23, 2024
1 parent cbdbf46 commit 68e3205
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion e2e/tests-selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ def check_for_error(self, experiment_name, experiment_slug='[no slug provided]')
raise Exception(f"Could not load {experiment_name} experiment, please check the server logs and make sure the slug ({experiment_slug}) is correct.")

def handle_error(self, e, experiment_name):
screen_shot_path = f"screenshots/{experiment_name}-{int(time.time())}.png"
current_time = time.strftime("%Y-%m-%d-%H-%M-%S")
screen_shot_path = f"screenshots/{experiment_name}-{current_time}.png"
print('Capturing screenshot to', screen_shot_path)
self.driver.get_screenshot_as_file(screen_shot_path)
self.fail(e)
Expand Down

0 comments on commit 68e3205

Please sign in to comment.