Ricardo-Osorio / epicgames-weekly-freegames

Automatically grab the weekly free games made available on epicgames store
MIT License
75 stars 7 forks source link

Issues running script #5

Closed Andrej730 closed 4 years ago

Andrej730 commented 4 years ago

I'm currently getting a few errors using script: 1) This line goes on until timeout https://github.com/Ricardo-Osorio/epicgames-weekly-freegames/blob/deee1adb2d6d94c60b069dedaa88b02809634916/main.py#L53 because email field id is actually "usernameOrEmail" and not "email"

2) This line https://github.com/Ricardo-Osorio/epicgames-weekly-freegames/blob/deee1adb2d6d94c60b069dedaa88b02809634916/main.py#L58 ends with error CRITICAL:egs-weekly-freegames:Message: element click intercepted: Element <button class="MuiButtonBase-root MuiButton-root MuiButton-contained SubmitButton MuiButton-containedPrimary Mui-disabled MuiButton-fullWidth Mui-disabled" tabindex="-1" type="submit" disabled="" id="login">...</button> is not clickable at point (464, 596). Other element would receive the click: <div class="controls-vertical">...</div> (Session info: chrome=81.0.4044.17) Not sure what I can do about it.

CorySanin commented 4 years ago

First error is easy enough to correct. 2nd looks to be about the button being disabled due to the login form being incomplete (no username or email).

However, xpath that finds free games appears to be broken. There could very well be other things that need to be redone but that's all I got so far.

Andrej730 commented 4 years ago

Fix worked but still have an issue with element click intercepted... error. I've replaced

https://github.com/Ricardo-Osorio/epicgames-weekly-freegames/blob/deee1adb2d6d94c60b069dedaa88b02809634916/main.py#L58

with

        WebDriverWait(browser, TIMEOUT).until(
            EC.element_to_be_clickable((By.ID, 'login'))
        ).click()

And now it works fine.

CorySanin commented 4 years ago

I'll drop that in, then. Thank you 🙂