Print more details about script progress

This commit is contained in:
gregory 2025-09-02 09:20:34 -04:00
parent 7fba24c163
commit 11e58c891e

View File

@ -156,6 +156,9 @@ rows = get_reservation_rows()
print('found ' + str(len(rows)) + ' reservations to add reservation comment to')
for i in range(0, len(rows)):
row = rows[i]
student_name = row.find_element(By.XPATH, './td[contains(@class, "cdk-column-Customer")]').get_attribute("innerText")
reservation_date = row.find_element(By.XPATH, './td[contains(@class, "cdk-column-date")]').get_attribute("innerText")
print('adding reservation comment for student ' + student_name + ' on ' + reservation_date)
row.find_element(By.XPATH, './/button[contains(@class, "fsp-button")]').click()
WebDriverWait(driver, timeout).until(
@ -183,7 +186,9 @@ for i in range(0, len(rows)):
textarea = comments.find_element(By.ID, 'comments')
textarea.clear()
textarea.send_keys("c172 " + today.strftime('%d %b, %H:%S'))
comment_text = "c172 " + today.strftime('%d %b, %H:%M')
print('comment text: ' + comment_text)
textarea.send_keys(comment_text)
if args.dry_run is False:
save_btn = comments.find_element(By.XPATH, './/button[contains(@ng-click, "save()")]')