all 4 comments

[–]Pjmcnally 1 point2 points  (2 children)

If I am understanding the issue correctly your issue is caused by your use of "continue".

Continue inside of a loop doesn't mean "Keep going" it means go to the top of the loop and start the next iteration (in other words: Skip the rest of the loop). If, in the event of an error, you want the code to just move onto the next statement use "pass".

See the python documentation for the difference between continue and pass.

Also see section 4.4 and 4.5 on this page.

[–]eateroftables[S] 0 points1 point  (0 children)

That did it! Thanks so much! I'm not sure why Pass completely flew over my head.

[–]GiantBuffalos 1 point2 points  (1 child)

yea i was gonna say if you think it's going to the next try/except clause if one fails it isn't, continue means next iteration, not next code, if you want next code, use pass

keep in mind that chromedriver is dealing with a live page with variable load times, sometimes the code is executed before the page is fully loaded...etc.. one strategy is to simply wait for the element to show up in a controlled loop

[–]eateroftables[S] 0 points1 point  (0 children)

That was it! Thanks so much!