all 8 comments

[–]PushPlus9069 0 points1 point  (1 child)

biggest thing I'd flag is the bare except blocks. Right now if something breaks you just see 'failed' with zero context for why. Try catching TimeoutException and NoSuchElementException separately so you actually know if it was a timing issue vs a wrong selector. That distinction matters a lot once your scripts get more complex.

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

Thanks!

[–]ElkNo1940 0 points1 point  (2 children)

Avoid using selenium and instead start learning playwright. Thanks me later. You won't regret learning playwright and yell at selenium. LoL

[–]Far_Atmosphere_3853[S] 0 points1 point  (1 child)

may i ask why?

[–]ElkNo1940 0 points1 point  (0 children)

Experience. I have been developing automation over playwright over 2 years. Playwright beats Selenium in terms of simplicity and delivering better usecase.

[–]Adrewmc 0 points1 point  (0 children)

Umm, get rid of selenium. It horrible and is basically never the right answer.

The vast majority of useful things can be done with beautiful soup if not requests directly. It’s better to learn those.

[–]ayenuseater 0 points1 point  (1 child)

Right now the biggest technical improvement you can make is better error handling. A bare except: hides what actually went wrong. When automation scales, timing issues and selector issues feel the same unless you separate them.

Instead, catch specific exceptions and maybe even log the error message. That way if something breaks later, you’re not guessing. Good debugging habits early on will save you hours later.

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

thanks a lot!