How to stop selenium from switching to the window it's running on when it refreshes or does something on a webpage?

Viewed 15

I want selenium to do everything in the background and play a sound when it reaches a specific page. But every time it refreshes or changes pages, it forcefully switches my current window to the browser its running in. How can I disable it? And if I can't, what's a good alternative to get what I'm trying to do.

0 Answers
Related