0

This is what the alert looks like. It reads: The proxy it3.prmsrvs.com is requesting a username and password I have a program in Selenium that automates a certain amount of stuff on a website. For some reason (this has been encountered also by my colleagues when using the browser normally without automation) there is the possibility of a pop-up showing in the webpage at a random point. My program's objective is to load a page, get a list of all the elements corresponding to a specific tag and then click on them one by one. They all open in a new tab. There is the possibility of a pop-up to show in the page after closing one of the tabs. This pop-up asks for a login but all I have to do is dismiss it and the page will keep working like always.

Now, I've seen people using driver.switch_to.alert.dismiss() but this doesn't seem to work on this page.

I checked the function on a very basic js alert and the dismiss works perfectly, so I think it's the type of alert that is the issue.

I can't inspect the page so I don't know how to retrieve the iFrame of this alert. (I saw this as a possible solution online)

What should I do?

  • What kind of an alert is that? You sure it's not like a browser notification type alert or a custom made alert instead of something spawned using `alert` – Matiiss Feb 10 '23 at 18:26
  • @Matiiss I honestly have no idea. It looks like a standard alert you get on webpages where you have to do the login. The alert itself is nonsensical. It reads: 'The proxy https://it3.prmsrvs.com is requesting a username and password ' but I have no idea what the proxy is. Trying to load the page gives me an error. I'll try to add a picture of it on the thread to give some more insight – BrokenPenguin Feb 10 '23 at 19:00

1 Answers1

0

This alert is the default Chrome proxy auth dialog.

It has nothing to do with the website itself.

Most likely you're using a proxy, and need to set up the username and password.

Check this answer for how to do it in Selenium + Python (could still be useful for other languages).

Andriy Stolyar
  • 585
  • 9
  • 21