I need you to create a script to automate a form entry and 2 button clicks to log me into an airline website and claim my ticket. Here are the requirements
1. Create a password protected form to take data input. No styling required on form, no error messaging or trapping. Super simple and basic. HT access is fine for password protection.
2. Form will have 5 fields: firstname, lastname, flight number, flight time in hour and min HH:MM, and US timezone (Pacific, Mountain, Central, Eastern)
3. Create a script to submit the form data to a fixed URL and then mimic hitting a submit button. This script will need to be able to get past no spider tags and properly mimic user agent info. For now user agent info can be set to one value for Chrome.
4. After the form is submitted there will be a new page or newly opened div on the existing page that has a button that needs to be hit to actually Check In and claim the airline ticket
5. The form needs to be submitted immediately after the time specified in the form. Not sure how many milliseconds after….we will need to experiment and see how the clocks on the two servers compare and how exact the time window is.
6. After form submission to Check In, you need to immediately analyze the resulting page and look for an error message indicating if the form was submitted too early. The exact tag we are looking for in the error message is TBD…I will find out for you. If you get this error message immediately resubmit the form and repost the Check in button. Repeat as needed until there is no error message.
7. If you do not get an error message then parse the Check In number from the resulting page and email it to me at a specified email address. You can use a simple mailsend tool to send unformatted, text only email for now.
8. I have a URL to host the login screen and the form.
9. You will be responsible for setting up the server to handle your scripts and serve the login page and form and to handle the mailsend