I'm new to the area this question was posted in, and I don't have a "correct" answer to hand, but I want to get them a clue as to why the question is not perhaps the right rabbithole, and namely that webdriver uses a different mechanism for handling browser "alerts" or as the OP seems to hint pop-ups.
How do I leave a comment if I only have not enough rep in this link below?
Function with the While/Try/Except construction intended to close pop-ups fails.
I'd hate to give a partial answer like I am hinting at above, am I breaking the rules if I leave a half-answer? It just feels better than nothing, and I don't know when next I will pass this way again.
Curiously I'm unable to even upvote these helpful comments below, which people have notably left as a comment not an answer, which I'm not allowed to leave on other people's posts confusingly.
50 reputation rule for a comment prevents people from getting valuable information. What can I do? is a 5 year old post, I know about it, and I am actually more interested in how does a person who is not an expert go about gaining 50 points when everyone is happy to give my -3 points just for asking. Yes, I know this is a duplicate question, but as I just pointed out, I'm unable to participate in that 5 year old question about this problem. I'm not a very fast typist, how do I gain 50 points? Or should I provide a half-answer and hope I get an upvote? Is that what people are telling me?
Seems, the way to get points, is to answer a question quickly, and keep editing your answer and improving the answer so that you get in there first. Learn the markup language to make your answer easier to read. And then hope the poster comes back and give you a vote later on. Although I miss-trust systems with badges and ranks, this is the best way to help and be helped.