Authentication - unable to navigate to authenticated page

This not really a satisfaying way to deal with authentication… And I don’t know about you, guys, but here, all of our working environments are behind Basc Auth. So the Authentication keyword is a must-have.
By the way, it could be great if the credentials could have been inserted in the HTTPHeader and not in the URL…

Agreed, it’s not always perfect. If you are looking to alter the HTTP header, take a look at this thread:
https://forum.katalon.com/discussion/4432/how-to-modify-request-headers-while-using-chrome-for-running-testcases.

Hopefully this will help

With the current version 3.9.1 this problem still occurs. You still need the FailureHandling workaround described above by Charles Brown.

@Katalon Studio team: Do you plan to fix this?

Why there is no news about this, I’m struggling to pass through the authentication popup and nothing works. I tried WebUI.authentication, WebUI.openBrowser(“http://username:password@WebsiteURL”) I used Web.setAlertText etc. etc. nothing works. The internet is full with this problem and Katalon doesn’t seem to care (as you can see no answer from a year ago). I started to really hate this tool - Cypress is much better

1 Like

WebUI.authenticate(baseURL, ‘username’, ‘password’, 60, FailureHandling.OPTIONAL)

It does not work if the prompted login popup is from Windows IIS authentication. Apparently it requires some custom stuff like: Katalon Studio Native Popup Window and Upload File

@gordanmircea Which browser are you using Chrome/ IE?
How you handle the same in Cypress.

In Cypress it was very easy, just need to add an auth header and works like a charm (see bellow). With Katalon I tried with both Chrome and Firefox, but because that pop-up is not a web element it is not recognized and apparently Katalon doesn’t have the capability of sending and auth header request for opening an URL.

cy.visit(‘URL’,{
auth: {
username: ‘string’,
password: ‘string’
}
)}

1 Like

Could you please share your test URL.

The below is sample URL with Windows Authentication popup. Please check if it is working in Chrome browser for you. I have no success with Firefox.

http://admin:admin@the-internet.herokuapp.com/basic_auth

AUTHEN%202

// Method -1 (Works in Chrome only)
 WebUI.openBrowser('http://admin:admin@the-internet.herokuapp.com/basic_auth')
// Method -2
WebUI.openBrowser('')
WebUI.authenticate('http://the-internet.herokuapp.com/basic_auth', 'admin', 'admin', 10, FailureHandling.OPTIONAL)
1 Like

I have the same. I tried with both Firefox and Chrome and it is not working. Did not find an easy solution to this. Like I said it needs some custom keywords to be made and some headaches. But I’m very new with Katalon I’m just trying to make a POC with it - Cypress is more intuitive and flexible (for me at least, I might be subjective here)

Could you please share your test URL.

No I can’t sorry. It is confidential, working just in intranet :frowning:

Is this URL working in your machine: http://admin:admin@the-internet.herokuapp.com/basic_auth

Yes - no auth requested

Hello, any update on the above, since i’m facing the same issue. i’m trying to navigate to dynamics 365 URL. but when replaying the recorded steps, the URL isn’t even displayed, and the window of the username and password isn’t appearing

1 Like

The first method helps me to solve the problem. Thank you!

@julia.nastenko Please try adding the FailureHandling.OPTIONAL as mentioned below

// Method -2
WebUI.openBrowser('')
WebUI.authenticate('http://the-internet.herokuapp.com/basic_auth', 'admin', 'admin', 10, FailureHandling.OPTIONAL)

Hello @discover.selenium

I have tried your mentioned solutions, however i am not getting the desired results. the login is failing
it wont even put in the credentials, it wont even navigate to the correct URL
WebUI.authenticate(‘https://katalon-demo-cura.herokuapp.com/profile.php#login’, ‘John Doe’, ‘ThisIsNotAPassword’, 60, FailureHandling.OPTIONAL)

1 Like

Hi @brianconril.rj WebUI.authenticate keyword is applicable only for windows authentication as shown below.

AUTHEN%202

Hi ,

Same issue. Navigating to the URl.But the Username and password values are not inputted into the fields.

Thanks