Automated Ticket Transfer API Development with Selenium
Budget: $250 – $750 USD
Project Overview
We need an API that automates the process of transferring tickets on a partner website. The API should handle login, email verification, navigation, and ticket transfer, ensuring the session remains active to avoid repeating the login process with each request.
Project Details
Step-by-Step Requirements
1. Receive API Request
• The website will send a request to the API with the following parameters: codcon, coditm, and idtkt.
2. Open Browser and Access Website
• The API will launch a browser instance using Selenium WebDriver and navigate to partnerdomain.com.
3. Login with Email
• The system should locate the email input field on the login form.
• Insert the provided email and submit the form.
4. Capture and Enter Verification Code
• After submitting, the website will send a verification code to the provided email.
• The API should check the email inbox (using IMAPClient or a similar library), capture the code, and enter it into the verification field on the website.
• Submit the verification code.
5. Session Persistence with Cookies
• Once logged in, the API should save session cookies, allowing it to reuse the session and avoid repeating the login for each request.
6. Navigate to Product/Ticket List
• The API will navigate to the list of tickets/products.
• Locate and click the “Distribute” button next to the desired ticket (each ticket has a unique link for distribution).
7. Open Distribution Screen and Select Option
• After clicking “Distribute,” a screen with two options will appear: “Add Recipient” and “Import .csv.”
• The API should select “Add Recipient.”
8. Enter Recipient Details
• A modal with fields for “Email” and “Quantity” will open.
• The API should fill in the recipient’s email and the number of tickets to be distributed.
• Submit the recipient details.
9. Confirm Recipient Details
• After submission, the screen will display the provided email and quantity.
• The “Continue” button will be enabled. Click to proceed.
10. Fill in Description and Internal Note Fields
• The next screen displays optional fields: “Description” and “Internal Note.”
• The API should populate “Description” with the coditm value and “Internal Note” with idtkt.
• Click “Continue” to proceed.
11. Final Distribution Confirmation
• A confirmation modal will appear with the details, such as:
• “Confirm distribution for Bookers Brazil? 1 ticket from Sector 11 will be distributed. This action cannot be undone.”
• The API should click the “Confirm” button to finalize the distribution.
12. Completion
• After confirmation, the system reloads and returns to the product listing page, ready for the next request.
Technical Requirements
• Session Persistence: Store and reuse cookies to avoid repeated logins.
• Error Logging: Implement error logging for each step to simplify debugging.
• Email Handling: Use a library (e.g., IMAPClient) to retrieve verification codes from email.
• Security: Securely handle email credentials and sensitive data.
Deliverables
1. A fully functioning API with all steps implemented.
2. Clear documentation on installation and usage.
3. Error handling and logging for troubleshooting.
Please provide examples of previous work with Selenium and API automation, and confirm familiarity with email retrieval (e.g., IMAPClient) and session persistence using cookies.
We need an API that automates the process of transferring tickets on a partner website. The API should handle login, email verification, navigation, and ticket transfer, ensuring the session remains active to avoid repeating the login process with each request.
Project Details
Step-by-Step Requirements
1. Receive API Request
• The website will send a request to the API with the following parameters: codcon, coditm, and idtkt.
2. Open Browser and Access Website
• The API will launch a browser instance using Selenium WebDriver and navigate to partnerdomain.com.
3. Login with Email
• The system should locate the email input field on the login form.
• Insert the provided email and submit the form.
4. Capture and Enter Verification Code
• After submitting, the website will send a verification code to the provided email.
• The API should check the email inbox (using IMAPClient or a similar library), capture the code, and enter it into the verification field on the website.
• Submit the verification code.
5. Session Persistence with Cookies
• Once logged in, the API should save session cookies, allowing it to reuse the session and avoid repeating the login for each request.
6. Navigate to Product/Ticket List
• The API will navigate to the list of tickets/products.
• Locate and click the “Distribute” button next to the desired ticket (each ticket has a unique link for distribution).
7. Open Distribution Screen and Select Option
• After clicking “Distribute,” a screen with two options will appear: “Add Recipient” and “Import .csv.”
• The API should select “Add Recipient.”
8. Enter Recipient Details
• A modal with fields for “Email” and “Quantity” will open.
• The API should fill in the recipient’s email and the number of tickets to be distributed.
• Submit the recipient details.
9. Confirm Recipient Details
• After submission, the screen will display the provided email and quantity.
• The “Continue” button will be enabled. Click to proceed.
10. Fill in Description and Internal Note Fields
• The next screen displays optional fields: “Description” and “Internal Note.”
• The API should populate “Description” with the coditm value and “Internal Note” with idtkt.
• Click “Continue” to proceed.
11. Final Distribution Confirmation
• A confirmation modal will appear with the details, such as:
• “Confirm distribution for Bookers Brazil? 1 ticket from Sector 11 will be distributed. This action cannot be undone.”
• The API should click the “Confirm” button to finalize the distribution.
12. Completion
• After confirmation, the system reloads and returns to the product listing page, ready for the next request.
Technical Requirements
• Session Persistence: Store and reuse cookies to avoid repeated logins.
• Error Logging: Implement error logging for each step to simplify debugging.
• Email Handling: Use a library (e.g., IMAPClient) to retrieve verification codes from email.
• Security: Securely handle email credentials and sensitive data.
Deliverables
1. A fully functioning API with all steps implemented.
2. Clear documentation on installation and usage.
3. Error handling and logging for troubleshooting.
Please provide examples of previous work with Selenium and API automation, and confirm familiarity with email retrieval (e.g., IMAPClient) and session persistence using cookies.
Related categories:
Python
Web Scraping
Data Scraping
API
Selenium Webdriver
Web API
API Development
API Integration