Print more details about script progress
This commit is contained in:
parent
7fba24c163
commit
11e58c891e
@ -156,6 +156,9 @@ rows = get_reservation_rows()
|
|||||||
print('found ' + str(len(rows)) + ' reservations to add reservation comment to')
|
print('found ' + str(len(rows)) + ' reservations to add reservation comment to')
|
||||||
for i in range(0, len(rows)):
|
for i in range(0, len(rows)):
|
||||||
row = rows[i]
|
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()
|
row.find_element(By.XPATH, './/button[contains(@class, "fsp-button")]').click()
|
||||||
|
|
||||||
WebDriverWait(driver, timeout).until(
|
WebDriverWait(driver, timeout).until(
|
||||||
@ -183,7 +186,9 @@ for i in range(0, len(rows)):
|
|||||||
textarea = comments.find_element(By.ID, 'comments')
|
textarea = comments.find_element(By.ID, 'comments')
|
||||||
|
|
||||||
textarea.clear()
|
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:
|
if args.dry_run is False:
|
||||||
save_btn = comments.find_element(By.XPATH, './/button[contains(@ng-click, "save()")]')
|
save_btn = comments.find_element(By.XPATH, './/button[contains(@ng-click, "save()")]')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user