Basic HTTP Authentication on Mac

Hi,

Im trying to login to a site which is behind basic HTTP Authentication, but not sure how to do this on Mac.

I can see that there is the Authenticate keyword for Windows, is there a similar keyword or configuration option for Mac?

Thanks.

I think Authentication keyword will work for both, have you tried with that on Mac?

Hi Vinh

Thanks for helping. It appears that Authentication is Windows only as i get the following error:

"Unable to navigate to authenticated page (Root cause: java.lang.Exception: Unsupported platform (only support Windows))"

Is there an alternative to using the Authentication keyword, perhaps a configuration option? Is it possible to open a Test Case as a new tab in the current open browser? Basic auth pops up because its ran in a new window, so opening in a new tab could act as a temporary workaround.

Thanks.

I solved this issue by passing the credentials in the url - see Can you pass user/pass for HTTP Basic Authentication in URL parameters?

So in the Script editor change the url to something that looks like the below:

WebUI.navigateToUrl('https://test:test1234@example.com/')
1 Like

Chrome doesn’t support inlined basic creds since version 59 as well as latest versions of other browsers. However Katalon still doesn’t work properly with authenticate method on mac. What could you suggest here?

jason carney said:

I solved this issue by passing the credentials in the url - see Can you pass user/pass for HTTP Basic Authentication in URL parameters?

So in the Script editor change the url to something that looks like the below:

WebUI.navigateToUrl('https://test:test1234@example.com/')

It’s work to me, thanks so much Jason

WebUI.navigateToUrl(‘https://test:test1234@example.com/’) not working on mobile

Not sure, i am using Chrome version 72+ and still able to pass credentials (no browser flags set either, other browsers work fine also).

Only thing i can think of is there may be settings/configuration on the server preventing inline credentials.

I havnt done a great deal of testing on mobile devices, though i have been able to start the web browser with WebUI.navigateToUrl().

Make sure the url you want to visit is added correctly, ie, for Google use WebUI.navigateToUrl(‘https://www.google.com’) (obviously, in this case there is no need to add inline credentials for going to Google web search).

Also, if its an app you want to start, try using Mobile.startApplication()