Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need error handling for lines 134/135 #2

Closed
tommmmyb opened this issue Dec 10, 2021 · 7 comments
Closed

Need error handling for lines 134/135 #2

tommmmyb opened this issue Dec 10, 2021 · 7 comments

Comments

@tommmmyb
Copy link

Lines 134 & 135 occasional throw a "no such element" error, which breaks the main while loop and exits the script. I fixed it by putting a simple try/except block around lines 131-172. Didn't make a pull request cause there's definitely a better solution.

Session info: chrome=96.0.4664.93, macOS Monterey v12.0.1

@pws1453
Copy link
Contributor

pws1453 commented Dec 10, 2021

Same issue here. MacOS Monterey, Chrome Version 96.0.4664.93.

@tommmmyb
Copy link
Author

More Info: it seems to happen when the page doesn't load properly (i.e. blank white screen). Lines 134/135 are looking for the "topBar" attribute, but if the page doesn't load properly, it errors out. Should probably just break the loop and have the window close and reopen then try again

Also unrelated suggestion, should have a list of more resumes (png, pdf, docx, etc). Upload limit is 9.76MB, should make them as close to that as possible. Could also upload add separate CV file (no file size limit)

@pws1453
Copy link
Contributor

pws1453 commented Dec 10, 2021

My PR should fix this issue, I found that I was running into issue where the code was trying to access URL[4], which doesn't exist. Let's see if there are additional issues.

@tommmmyb
Copy link
Author

Same lines now running into error but for new reason - "Account already exists" page comes up instead of "account created successfully." Looks like we might run out of fake emails lmao

Surrounding it with a try/except block still handles the error, but it's inefficient. Script should probably be broken into functions to make error handling easier

@pws1453
Copy link
Contributor

pws1453 commented Dec 10, 2021

I created a new issue for this here: #4
Much of the code does need to be restructured.

@Audibles
Copy link
Collaborator

I just made a PR that should hopefully fix this! was able to run the script for awhile with no issues

@pws1453
Copy link
Contributor

pws1453 commented Dec 10, 2021

Your script looks great! Once it's.... well... not 4am here, and your PR gets accepted, I can merge the work I've been doing on relating to making a couple internal data strctures (read... classes).

tommmmyb pushed a commit to tommmmyb/KelloggBot that referenced this issue Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants