from selenium import webdriver
from selenium.webdriver.common.by import By
import time

PATH = "C:\Program Files (x86)\chromedriver_win32\chromedriver.exe"
driver = webdriver.Chrome(PATH)

def attendanceFiller(dailyPhrase):
    tinyURL = 'https://tinyurl.com/'

    driver.get(tinyURL + dailyPhrase)
    time.sleep(2)

    buttonPath = '/html/body/div/div[2]/form/div[2]/div/div[3]/div[1]/div[1]/div/span/span'

    andrewID = "sandray"

    textBoxXPATH = "/html/body/div/div[2]/form/div[2]/div/div[2]/div[1]/div/div/div[2]/div/div[1]/div/div[1]/input"

    textBox = driver.find_element(By.XPATH, textBoxXPATH)
    textBox.send_keys(andrewID)
    time.sleep(2)

    submitButton = driver.find_element(By.XPATH, buttonPath)
    submitButton.click()
    time.sleep(2)


attendanceFiller("selenium-test")
