Message: User prompt of type promptUserAndPass is not supported

281 Views Asked by At

I am creating Python script for a website involving pop up sign in.

Tried the below code and getting an error message

 alert = driver.switch_to.alert
 alert.send_keys('username')

Error - Message: User prompt of type promptUserAndPass is not supported

How to resolve this error? any other way to input credentials for the pop up sign in?

1

There are 1 best solutions below

0
Ingmar Boddington On

This is caused by lack of implementation in the driver for basic auth prompt.

Driver implementation has been blocked by a gap in the standards (see here for info https://github.com/w3c/webdriver/issues/385)

As per a comment, there are other ways to send basic auth details.

  • In URL: https://{username}:{password}@host.example.com/ (if you have a domain in username, then include this e.g. [email protected]:[email protected]
  • In Header: "Authorization: Basic {String}" (Where {String} is Base64 encoded "{username}:{password}")

(Both possible using requests library which is present in AppDynamics Synthetics by default)

(Make sure you use URL Encoding if using the URL method.