This project is a fun side experiment to explore if a bot can automate the process of filling out simple homework website problems. It uses Python with the Selenium package to interact with web elements, simulate user actions, and perform tasks like filling forms and navigating through sections.
- Python 3.x
- Selenium WebDriver
- ChromeDriver (compatible with the installed version of Google Chrome)
- Install Python 3.x on your machine.
- Install Selenium package using pip:
pip install selenium
- Download ChromeDriver from here and ensure it's in your PATH.
- Clone or download this repository to your local machine.
- Update the script with the relevant website URL, username, and password.
- Execute the script:
python homework_bot.py
-
Key Features:
-
Navigates to specific URLs.
-
Logs in using provided credentials.
-
Fills out short answer and multiple-choice questions by revealing and submitting answers.
-
Interacts with animations and submits responses.
-
Classes and Methods:
-
zyBot
: Main class for the bot. -
launch_browser()
: Initializes and opens the browser. -
navigate_to()
: Navigates to a specified URL. -
accept_alert()
: Handles browser alerts. -
click_button()
,fill_form()
: Interact with web page elements. -
wait_for_landing_page()
: Waits for a specific element to ensure the page has loaded. -
PA_shortAnswer_fill()
,PA_MC_fill()
,PA_animation_fill()
: Functions to fill out different types of participation activities. -
login()
: Logs into the website. -
autoFill()
: Automates the process of filling out activities for multiple sections. -
print_info()
: Prints current bot settings. -
Selenium WebDriver:
-
Utilizes the Selenium WebDriver to control the browser.
-
Implements explicit waits to handle dynamic content.
This project was created for educational purposes and should not be used to violate academic integrity policies.
- Logan F