- Author: Abhishek Yadav
This project provides a Python script for automating the process of logging into HackerRank, navigating to a Python coding challenge, uploading a solution code file, and submitting it for testing. This automation aims to save time and effort for users who frequently participate in HackerRank challenges.
- Version: 1.0
- Date: 14-Aug-2023
- Azure Ticket Link: Azure Ticket
Before running the script, make sure you have the following:
- Python 3.x installed on your system.
- Required Python packages:
dotenv
,selenium
. You can install them usingpip
- Chrome browser and the appropriate version of
chromedriver
for your Chrome browser installed.
- Clone this repository to your local machine or download the provided script.
- Install the required packages as mentioned in the "Prerequisites" section.
- Update the
.env
file with your HackerRank username and password:HACKERRANK_USERNAME=your_username HACKERRANK_PASSWORD=your_password
- Modify the file path in the script to point to the correct location of the solution code file you want to upload:
hidden_element.send_keys("/path/to/your/solution/file.py")
- Run the script using the following command:
python hackerrank_automation.py
The script hackerrank_automation.py
performs the following actions:
- Initializes a Chrome browser using the
webdriver
from Selenium. - Logs into HackerRank using the provided credentials.
- Navigates to the Python coding challenges page.
- Selects a specific Python coding challenge and opens it.
- Uploads the solution code file for the selected challenge.
- Submits the code for testing and displays a success message upon successful submission.
- This script is provided as-is and might need adjustments based on changes in the HackerRank website's structure or any other dependencies. It's recommended to review and modify the script accordingly if needed.
This project is for educational and automation purposes only. The author is not responsible for any unauthorized actions or misuse of this script. Use this script responsibly and only on HackerRank challenges you have the right to participate in.