0
Input Text Into Alert    admin    action=username

enter image description here

I want to know how to enter the username and password . I cannot find the xpath also for this.

Pradap Pandian
  • 367
  • 1
  • 8
  • 19
  • I answered a similar question to [this](https://stackoverflow.com/questions/60496455/selenium-log-in-on-pop-up-webpage-without-html/60496826#60496826) a while ago. We concluded that it wasn't possible. Please do let me know if you do find a solution. – AzyCrw4282 Mar 21 '20 at 18:24
  • 1
    Its not alert box but HTTP basic authentication popup, you can not automate it using selenium alone. You can use AutoIt to traverse that popup with robotframework. There is also one alternate way discussed here. https://serverfault.com/questions/371907/can-you-pass-user-pass-for-http-basic-authentication-in-url-parameters – Sariq Shaikh Mar 21 '20 at 21:36

1 Answers1

1

You can avoid this pop up by putting authentication parameters in application URL,

example: https://username:password@application_url

Chirag S
  • 63
  • 3
  • The only consistent workaround is to use AutoItLibrary with custom firefox profile. `1. First create your own firefox profile (google how to create). 2. Then launch firefox with the new profile created, and launch the you want to test. 3. When the authorization alert come out, manually input the username & password and click enter or proceed. This will save the username & password to this browser cache/cookie.. 4. Next, on RIDE -> Open Browser firefox ff_profile_dir=${your_new_profile_dir} Sleep 2s AutoItLibrary.Send {ENTER}` – Temizzi Mar 05 '21 at 13:45