Auth pop up sign

Hi there - new to katalon studios and man, i am struggling just trying to get onto this site. Ive been looking at tutorials and here and the docs and i just cant seem to either find the right answer or understand what ive been reading if it is the right answer.

I am on a Mac btw and on 8.4.0

I cant seem to even be able to 1. acknowledge that the pop up is there and 2. type into it. I have tried:

  • switch to window title
  • set text
  • set alert text
    -verify alert present

im just very confused on how to go about this. I appreciate the help as again im very new to this and thought this was going to be easier than Cypress.io where I have to type al the tests by hand, but so far its Katalon -1 and Me -0 haha

Have you used the recorder? If so, I strongly recommend to stop using it, as it is not future-proof. It creates oftentimes wrong xpath (especially if you are testing a one-page application), which work for the current test but break at the first change.

You should instead use the Spy (Action → Spy) to capture the popup, then choose the best xpath and set it as a selector. Afterwards, from the Katalon Spy window, simply rename the Test Object that you captured (and whose selector you customized) and save it to your object repository. In your test case script, you can fetch the Test Object this way: findTestObject('Object Repository/yourPopupObject'). You can also use the inspect element method and, as you right click on the html tag for the popup, you can select Copy → Copy XPath (or full xpath) and then adjust it to your needs.

Before you try to interact with the popup or anything that doesn’t load with the page initially, you should use the WebUI.WaitForElementPresent() method, Then, try again the other actions and you’ll have better chances!

I would also suggest using the script mode, as it gives you a ton more flexibility over manual mode when writing your Test Case. You could use the recorder to record the basic steps which need to be done and in which order, and then go into your test case and edit it to use the Test Objects you created using the Spy.

@natalie.reinicke Please try the below solution in Chrome browser.

String username = "admin";
String password = "admin";	
// Actual URL : https://the-internet.herokuapp.com/basic_auth
WebUI.openBrowser("https://"+username+":"+password+"@"+"the-internet.herokuapp.com/basic_auth")

that didnt seem to work. :confused: