Browser based pop-up for password input

I opened the target URL and entered my username and password to complete the login. After logging in and loading, the system popped up a window asking me to enter my password again on the pop-up window.
I saw selectoron F12 browser, please refer to the screenshot for details.
Then I wrote in my automation code: Fill Text .layui-layer-input input[type=“password”] 123456
Test run error:
TimeoutError: locator.fill: Timeout 10000ms exceeded.
Call log:

  • waiting for locator(‘.layui-layer-input input[type=“password”]’)
    I am certain that I have waited enough time for the pop-up window to become visible.
    What should I do?

Hi Hugo,

Welcome to the Robot Framework community,

Your password field is in an iframe (see the sections of your html I highlighted), unfortunately from the screenshot I can’t see the name of the iframe, so that’s something you’ll need to find.

Once you known the iframe’s id / name / identifier, you can use the Browser Library’s >>> syntax, see the iFrames section under Finding elements

Dave.

1 Like

thx for your help dave

1 Like

Handling those browser-level authentication pop-ups can be such a pain since they aren’t part of the actual page DOM. If you’re using the Browser library (Playwright-based), one of the cleanest ways to handle this is by passing the credentials directly in the URL using the username:password@url format. It usually bypasses the pop-up entirely and lets the test proceed.

If that doesn’t work for your specific environment, you might want to look into using the New Context or New Browser keywords to set the httpCredentials in the background. It’s a bit more “under the hood,” but it’s way more reliable than trying to use a library like AutoIt or Sikuli to click on OS-level windows.

Basic auth over url has been deprecated in multiple browsers and afaik only Firefox desktop has support for this..

1 Like