SecureAuth Sign In pop up. How to handle

Hi Robot Framework experts.

Using Robot Framework I had automated a portal which uses secureAuth for sign in and able to execute the tests in local desktop no Single sign on issue as I already signed into company portal , so scripts automatically sign’s into the application.

But I have to run these tests in a remote server and when the script clicks on Login in button Secureauth displays a pop up as seen in the attached screenshot. I am unable to enter text in the pop up or do anything with script.

Tried:

  1. Sending ID and password in URL( https://ID:Password@uri ) did not work.
  2. Tried Alert keywords did not work. I guess it is not a alert at all.

Can some one point me in right direction Please.

Thank you for your time…

Hi,

I assume that you use SeleniumLibrary…
(It is always important to also tell us which Library you use, because Robot Framework itself can not automate WebBrowser. Libraries can)

With SeleniumLibrary one deprecated known possibility is, to send the user and pwd as url, what you already tried!
You are right. Basic Auth are not alerts.

You can Google for Basic Auth Selenium but there are pretty old answers. Not sure if they are still working.

One solution would be to leave SeleniumLibrary behind and switch to Browser library.

That brand new modern library has the possibility to add Basic Auth headers to a new Context.

2 Likes

You an use Windowsapplication driver that comes as a part of Appium.

Tried using Sikulilibrary for ROBOT Framework, it is working fine in desktop, but would not run in remote linux server in browser headless mode.

Still stuck with this issue. Currently exploring what @René suggested.

How is it going with Browser?

You have to use

https://marketsquare.github.io/robotframework-browser/Browser.html#New%20Context

New Browser
New Context    httpCredentials={'username': 'admin', 'password': '123456'}
New Page       https://example.com
1 Like

@René Thank you for the sample script.
I was skeptical about Browser Library until you sent me those 3 lines of code, and after seeing your code I felt it can’t be that simple to handle Basic Auth popup. I felt this way about the popup coz there are many unconcluded posts about it in all code forums, and since last week I spent some time building a crude solution to get token and set cookie when opening the browser. :face_with_head_bandage:

I must apologize for ignoring your suggestion to "leave SeleniumLibrary behind ". I taught how else I will handle the browser if I leave selenium and just ignored your suggestion. Now I understand its due to my ignorance. :slight_smile:

Browser Library handled Basic Auth pop up like a charm … thank you very much for suggesting Browser library. now I am moving all my Selenium keywords to equivalent Browser Library keywords.

I had executed a few test cases with Browser lib keywords and noticed tests are running faster and less flaky. I don’t need waits, close browser, etc…any more.

Thank you very much… :handshake: :handshake:

3 Likes

The Browser library does not support Chrome and the web application I’m testing is working only on chrome.

Hey cool!!!:performing_arts:

Nice that you like it!!! :heart::blue_heart::purple_heart:

Hi hassand,

Google Chrome is basically the same as Chromium. Chromium is the open source Version of Chrome. It only does not have the google telemetry tracking.

So when you use Browser library you can use Chromium. I think your System under Test should work with it technically. If your developers request exactly “Chrome” that is a bug. Imho.

Cheers

How do i import the Browser library into my robot framework?

All infos should be at https://robotframework-browser.org