Skip to content

AC one-way search failing with "Missing form element: tripTypeOneWay" #51

Description

@zedkyuu

Log output:

[AC] error Unexpected error occurred while searching!
Error: Evaluation failed: Error: Missing form element: tripTypeOneWay
    at __puppeteer_evaluation_script__:6:19
    at ExecutionContext.evaluateHandle (/home/zq/node_modules/puppeteer/lib/ExecutionContext.js:121:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  -- ASYNC --
    at ExecutionContext.<anonymous> (/home/zq/node_modules/puppeteer/lib/helper.js:110:27)
    at ExecutionContext.evaluate (/home/zq/node_modules/puppeteer/lib/ExecutionContext.js:48:31)
    at ExecutionContext.<anonymous> (/home/zq/node_modules/puppeteer/lib/helper.js:111:23)
    at DOMWorld.evaluate (/home/zq/node_modules/puppeteer/lib/DOMWorld.js:112:20)
  -- ASYNC --
    at Frame.<anonymous> (/home/zq/node_modules/puppeteer/lib/helper.js:110:27)
    at Page.evaluate (/home/zq/node_modules/puppeteer/lib/Page.js:782:43)
    at Page.<anonymous> (/home/zq/node_modules/puppeteer/lib/helper.js:111:23)
    at module.exports.fillForm (/home/zq/node_modules/flightplan-tool/src/Searcher.js:160:17)
    at module.exports.search (/home/zq/node_modules/flightplan-tool/src/engines/ac/searcher.js:57:18)

I don't know JS, but I did look at the Aeroplan search page and found that the element seems to be named "tripTypeRoundTrip" and so I subbed that into the code. It seems to work now, but I don't really know yet if the data is worth anything.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions