fpoppinga / kicktipp-bot

You're invited for a kicktipp game, but don't know anything about soccer? No problem, just let this bot guess for you.
7 stars 2 forks source link

Script fails to login to kicktipp #1

Closed WookieFPV closed 6 years ago

WookieFPV commented 6 years ago

Hi @fpoppinga I wanted to use your bot (for the world championship). But your script fails to login to kicktipp. The script doest find/get the .messagebox.success div. Im not sure what is the cause of this, credentials should be correct in the .env File (double checked that).

See logs for more info:

yarn start
yarn run v1.3.2
$ yarn build && yarn run nightwatch
$ tsc
$ nightwatch
Before!

[Kicktipp] Test Suite
=========================

Running:  login
:starkes_häkchen: Element <#kennung> was visible after 32 milliseconds.
:starkes_häkchen: Element <#passwort> was visible after 21 milliseconds.
:starkes_häkchen: Element <.formsubmit input[type="submit"]> was visible after 24 milliseconds.
:starkes_malzeichen_x: Timed out while waiting for element <.messagebox.success> to be present for 15000 milliseconds.  - expected "visible" but got: "not found"
   at Page.assertLoginSuccessful (/Users/iot/kicktipp-bot/dist/pages/homepage.js:4:21)
   at Object.login (/Users/iot/kicktipp-bot/dist/tests/kicktipp.js:23:14)

FAILED:  1 assertions failed and 3 passed (19.683s)

_________________________________________________

TEST FAILURE:  1 assertions failed, 3 passed. (19.771s)

:starkes_malzeichen_x: kicktipp

  - login (19.683s)
  Timed out while waiting for element <.messagebox.success> to be present for 15000 milliseconds.  - expected "visible" but got: "not found"
      at Page.assertLoginSuccessful (/Users/iot/kicktipp-bot/dist/pages/homepage.js:4:21)
      at Object.login (/Users/iot/kicktipp-bot/dist/tests/kicktipp.js:23:14)
  SKIPPED:
  - predict
  - end

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
nerdbeere commented 6 years ago

Hey there,

I also wanted to use this bot for the world championship.

Digged into the code for some time and managed to work around the first issue but am now stuck on #tippabgabeForm:

Timed out while waiting for element <#tippabgabeForm> to be present for 15000 milliseconds. - expected "visible" but got: "not found"

I checked with the DOM of the page and the elements are there so I'm not really sure where the problems are coming from.

fpoppinga commented 6 years ago

Hi guys. I didn’t find time to look into this. But I have this on my agenda.

fpoppinga commented 6 years ago

Okay, I actually had stuff still lying around - who would have guessed that somebody would ever depend on this important project anyway.

I fixed this issue in the most recent commit. It is mostly related to kicktipp not considering this bot when redesigning their page.

Because it's late and also the World Cup is literally tomorrow, It is a little bit mixed with stuff that aims to make this run in Docker (so one can host the bot at AWS or GCE...)