Generate Custom Browser popup message

Is there any way I can generate custom popup message for browser. For example after successfully login I want to generate a custom browser popup message like “Login successfully”.

  1. This is a very BAD idea.
    Tip: DO NOT CHANGE THE AUT THROUGH TEST CODE

  2. This code will issue an alert

String js = 'alert("Login successful");'
WebUI.executeJavaScript(js, null)

i am looking for katalon recorder sripts

Then you’re posting in the wrong forum category.

It’s depend on how your popup should work.
JS pop up like “alert” need to be closed by clicking “OK”, so if You want your test to stop and wait until You click “OK” the answer is YES - it is possible. In Katalon if You want to use

alert(‘some text 123’)

you need to “runScript” but You have to use

originalAlert(‘some text 123’)

BUT
If You want Your test to go forward after showing pop up for 5 sec for example the answer is… YES as well :smiley:
But it’s slighlilty more difficult - take a look at that (You need to create HTML element):