Advertisement
hackdefendr

Flood Form

Jan 5th, 2025
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.78 KB | Source Code | 0 0
  1. from selenium import webdriver
  2. from selenium.webdriver.common.by import By
  3. from selenium.webdriver.support.ui import Select
  4. from selenium.webdriver.common.keys import Keys
  5. import time
  6.  
  7. # Initialize the WebDriver
  8. driver = webdriver.Chrome()  # or webdriver.Firefox() if you are using Firefox
  9. driver.get("https://faith-freedom.com/savegirlssports")
  10.  
  11. # Allow the page to fully load
  12. time.sleep(3)
  13.  
  14. try:
  15.     # Fill out the student name
  16.     student_first_name = driver.find_element(By.NAME, "firstName")  # Replace with correct name attribute
  17.     student_first_name.send_keys("Jane")
  18.  
  19.     student_last_name = driver.find_element(By.NAME, "lastName")  # Replace with correct name attribute
  20.     student_last_name.send_keys("Doe")
  21.  
  22.     # Fill out the student's birthdate
  23.     birth_month = driver.find_element(By.NAME, "month")  # Replace with correct name attribute
  24.     birth_month.send_keys("01")
  25.  
  26.     birth_day = driver.find_element(By.NAME, "day")  # Replace with correct name attribute
  27.     birth_day.send_keys("15")
  28.  
  29.     birth_year = driver.find_element(By.NAME, "year")  # Replace with correct name attribute
  30.     birth_year.send_keys("2010")
  31.  
  32.     # Select grade level
  33.     grade_level_dropdown = Select(driver.find_element(By.NAME, "gradeLevel"))  # Replace with the correct selector
  34.     grade_level_dropdown.select_by_visible_text("5th")
  35.  
  36.     # Fill out student phone number
  37.     student_phone = driver.find_element(By.NAME, "studentPhone")
  38.     student_phone.send_keys("1234567890")
  39.  
  40.     # Fill out student email
  41.     student_email = driver.find_element(By.NAME, "studentEmail")
  42.     student_email.send_keys("jane.doe@example.com")
  43.  
  44.     # Fill out School District and Name of School
  45.     school_district = driver.find_element(By.NAME, "schoolDistrict")
  46.     school_district.send_keys("Example District")
  47.  
  48.     school_name = driver.find_element(By.NAME, "schoolName")
  49.     school_name.send_keys("Example High School")
  50.  
  51.     # Select Type of School
  52.     school_type_dropdown = Select(driver.find_element(By.NAME, "schoolType"))
  53.     school_type_dropdown.select_by_visible_text("Public")
  54.  
  55.     # Student Athlete status
  56.     is_student_athlete = Select(driver.find_element(By.NAME, "isAthlete"))
  57.     is_student_athlete.select_by_visible_text("Yes")
  58.  
  59.     # Select Sport
  60.     sport_dropdown = Select(driver.find_element(By.NAME, "sport"))
  61.     sport_dropdown.select_by_visible_text("Basketball")
  62.  
  63.     # Transgender student in team status
  64.     transgender_status = Select(driver.find_element(By.NAME, "transgenderStatus"))
  65.     transgender_status.select_by_visible_text("No")
  66.  
  67.     # Parent's Information
  68.     parent_relation = Select(driver.find_element(By.NAME, "parentRelation"))
  69.     parent_relation.select_by_visible_text("Mother")
  70.  
  71.     parent_first_name = driver.find_element(By.NAME, "parentFirstName")
  72.     parent_first_name.send_keys("Ann")
  73.  
  74.     parent_last_name = driver.find_element(By.NAME, "parentLastName")
  75.     parent_last_name.send_keys("Doe")
  76.  
  77.     parent_email = driver.find_element(By.NAME, "parentEmail")
  78.     parent_email.send_keys("ann.doe@example.com")
  79.  
  80.     parent_phone = driver.find_element(By.NAME, "parentPhone")
  81.     parent_phone.send_keys("0987654321")
  82.  
  83.     # Agree & Sign
  84.     student_ack = driver.find_element(By.NAME, "studentSignature")  # Replace with correct name attribute
  85.     student_ack.send_keys("Jane Doe")
  86.  
  87.     parent_ack = driver.find_element(By.NAME, "parentSignature")  # Replace with correct name attribute
  88.     parent_ack.send_keys("Ann Doe")
  89.  
  90.     # Submit the form
  91.     submit_button = driver.find_element(By.NAME, "submit")  # Replace with correct element
  92.     submit_button.click()
  93.  
  94.     # Confirmation Page
  95.     time.sleep(3)  # Allow time for submission and possible navigation
  96.  
  97. except Exception as e:
  98.     print("An error occurred:", e)
  99.  
  100. finally:
  101.     driver.quit()
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement