I need to automate getting information from a travel portal, to be build as Chrome Browser extension.
I will release the portal's name privately during project discussions.
What the user would do:
- Enter start Airport
- Enter destination Airport
- Select one-way
- Select only directs
- Select 'one adult'
- Select date
(in automation, this can be formulated as one GET with parameters, like: [login to view URL] )
The browser opens the next page, where some ajax calls are getting information about all available flights.
As soon this process is done, the user sees a list (List No 1) of flights, each presenting the airline, times, and the best price option for this particular flight and a button to get more information.
By clicking on these buttons, the user gets a new view with the flight number and a list (List No 2) of all offers for this particular flight.
The flow in the browser automation must be:
Once started, it should run infinite, until I stop it.
1. Get flight (start/dst/date) to be queried from my backend server. This will be a HTTP GET and I will answer a JSON
2. Get the information from the travel portal by issuing the above URI
a. Wait for the AJAX' to be finished with List No 1
b. For every item
i. 'klick' on every Button to get the results of List No 2
ii. Collect all information of List No 2
iii. 'klick' on 'back' Button
c. After collecting all information, post a JSON to my backend server
3. Wait for x seconds (the number odf seconds is sent in the JSON in step 1)
4. Start over at step 1
- All information in LIST No 2 has been received by the GET in step 2. 'Klicking' on the Button in step 2.b.1 does not get new information from the travel portal. So, step 2.b may be much easier for automation.
- Instead of waiting x seconds, you may have a better idea. Let's talk.
- Using Chrome seems to be the best option to pretend being a user. I don't rely on Chrome, but the portal must not be able to detect automation.
- I need meaningful logging, so we can detect errors in case the portal changes design/path/names …
- the chrome extension requires a configuration field to set up a USER ID and PWD, which (if set) will be used in the queries to my back-end for basic authentication