Solving Pop-up dialog issue with Katalon Studio


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/pop_up_dialog_issue.html

I want to click at Allow button as shown in screenshot image

I am unable to capture the object of allow button

Have you tried to create your own TestObject?

Such as: //button[text()=‘Allow’]

If you are trying to create the TO within KS, then add a “tag” of button and then add “text” of Allow

I guess these are browser level notification.

1 Like

Hi @ravi.shankar , As I said earlier, this popup is a browser notification.

Below is the test site, I used to Allow camera.

https://facialsystems.com.au/facial/dev/bin/

image

  1. Firstly you have to make the below said Project Settings

  2. Execute the script

WebUI.openBrowser ('https://facialsystems.com.au/facial/dev/bin/')

WebUI.waitForPageLoad* (10)

Still this permission prompt alert is appearing… can u please guide me i.e. how to write the script to click at ‘Allow’ button.

what should I do in firefox.

I need to switch context to a browser login popup that the web spy does not recognize. I don’t know how to create an object I can’t inspect. Can you help?

Thank you.

@lbk If you right click on the textbox of Username, and then select Inspect (you may have to do this twice) you will see the HTML of the element. You can create a Text Object (right click on the appropriate Object Repository folder and select New > Test Object) and then add the xpath to the element. If you need help, put the HTML here and we can assist you.

Unfortunately, the inspect option does not appear for this browser popup.

I’ve tried in chrome, firefox and safari.

My UI guy says:

Problem is that’s a server-layer authentication form that appears before you get to the actual site so there’s no underlying markup associated with that.

If I’m running the test to a browser through katalon I can manually login, but if I’m sending the test through sauce labs I don’t have that ability, and I need to send this test through sauce labs.

Any suggestions on how to automate the server-layer authentication?

HI @lbk,

To deal with authentication popup througn SauceLabs, you can put your server username and password in the URL.
Example:

WebUI.navigate('https://username:password@the-internet.herokuapp.com/basic_auth')

References:
https://wiki.saucelabs.com/display/DOCS/Basic+HTTP+Authentication

1 Like

Thank you @duyluong. That gets me through on chrome.

Looks like chrome is the only browser this will work for though.

A suggested alternative is setting --auth in the Sauce Connect Proxy
https://wiki.saucelabs.com/display/DOCS/Using+--auth+with+Sauce+Connect+Proxy

Is that a possibility when running from Katalon?