I'm using selenium for web scraping, and sometimes, on the website unexpected alerts appear, which breaks the script.
Alert is one type of error; sometimes, the page didn't get loaded properly, and selenium could not find an element due to server performance issues.
So I'm thinking of adding a try/except block so that whenever selenium through an error, it gets captured, and the script gets re-run. But I'm able to catch errors specific to selenium. How can I catch errors thrown by only selenium?