i am giving you my python script, it is running on ubantu 18.04 lts, and do not change any thing just define script working, here the script, from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
import datetime

# Path to geckodriver (make sure this path is correct)
driver_path = "/usr/local/bin/geckodriver"  # Update this path if geckodriver is elsewhere

# Initialize the Firefox WebDriver
driver = webdriver.Firefox(executable_path=driver_path)

try:
    # Open the login page
    url = "http://iattendance.com:8004"  # Replace with your actual login URL
    driver.get(url)

    # Wait for the page to load and the login fields to be clickable
    WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, 'email')))
    username_field = driver.find_element(By.ID, 'email')
    password_field = driver.find_element(By.NAME, 'password')

    # Enter credentials
    username_field.send_keys('fhill@mail.com')  # Replace with your actual email
    password_field.send_keys('password@1')       # Replace with your actual password
    password_field.send_keys(Keys.RETURN)        # Submit the form

    # Wait for the dashboard link to be clickable
    WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.LINK_TEXT, "Dashboard")))

    # Navigate to the Dashboard
    dashboard_link = driver.find_element(By.LINK_TEXT, "Dashboard")
    dashboard_link.click()

    # Wait for the attendance table to be visible
    WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, 'zero_config')))

    # Get today's date formatted as "DD MMM, YYYY"
    today_date = datetime.datetime.now().strftime("%d %b, %Y")  # E.g. "02 Feb, 2025"
    print(f"Today's Date: {today_date}")

    # Check the dates in the attendance table
    table_rows = driver.find_elements(By.XPATH, "//table[@id='zero_config']/tbody/tr")
    
    # Initialize flag to check if today's date is present
    attendance_present = False  

    for row in table_rows:
        # Extract the date from the first column of the row
        date_cell = row.find_element(By.XPATH, ".//td[1]")  # Get the first cell of the row (Date)
        date_text = date_cell.text.strip()  # Get the text and clean whitespace
        print(f"Found Date: {date_text}")

        # Compare the found date with today's date
        if date_text == today_date:
            # If today's date matches, get the check-in time from the second column
            check_in_cell = row.find_element(By.XPATH, ".//td[2]")  # Assuming check-in time is in the second column
            check_in_time = check_in_cell.text.strip()  # Get the check-in time text
            print(f"Check-In Time for {date_text}: {check_in_time}")

            # Check if check-in time is present
            if check_in_time:  # If there's a check-in time
                # Check the status in the last column
                status_cell = row.find_element(By.XPATH, ".//td[5]")  # Assuming status is in the 5th column
                status_text = status_cell.text.strip()  # Get the text and clean whitespace
                
                print(f"Status for {date_text}: {status_text}")

                if status_text.lower() == 'present':
                    print(f"Today's attendance is already marked as 'Present' at {check_in_time}. No action required.")
                    attendance_present = True  # Mark as present
                else:
                    print(f"Today's attendance is not marked as 'Present' but check-in time is {check_in_time}. Further action may be necessary.")

                break  # Exit loop since we've checked today's date

    if not attendance_present:
        # Click the "Mark Attendance" button if attendance is not present
        mark_attendance_button = WebDriverWait(driver, 10).until(
            EC.visibility_of_element_located((By.ID, "markAttendanceButton"))
        )
        mark_attendance_button.click()  # Click the link
        print("Attendance marked.")

    # Optionally wait a few seconds before closing the browser
    time.sleep(5)

finally:
    # Close the browser
    driver.quit()