# Negative Login test in Katalon Studio

**URL:** <https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532>\
**Category:** Web Testing\
**Tags:** web-testing, katalon-studio\
**Created:** [September 4, 2019, 3:33am UTC](https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532 "2019-09-04T03:33:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![handy1632](https://avatars.discourse-cdn.com/v4/letter/h/c89c15/32.png) [@handy1632](https://forum.katalon.com/u/handy1632)\
**Post date:** [September 4, 2019, 3:33am UTC](https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532/1 "2019-09-04T03:33:24Z")

</div>

Hello Everyone,  
I’m really new in katalon studio and i’m finding some problem

My case is, i need to test negative test when login. So when either i put wrong username or password, it will show failed alert  
How do i capture that failed alert in my test case ?

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [September 4, 2019, 3:45am UTC](https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532/2 "2019-09-04T03:45:29Z")

</div>

If you have any of the information listed here, please post it so that we can better understand your question:

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-how-to-help-us-help-you-my-test-is-broken-nothing-works-please-help-me/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

---

<div class="post-metadata">

**Author:** ![handy1632](https://avatars.discourse-cdn.com/v4/letter/h/c89c15/32.png) [@handy1632](https://forum.katalon.com/u/handy1632)\
**Post date:** [September 4, 2019, 4:05am UTC](https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532/3 "2019-09-04T04:05:02Z")

</div>

okay, sorry if my question is not clear,

so i wanna make login test case, but i’m gonna put wrong username,  
in the website that i testing, it will show an failed alert because my username is wrong

my question is, how do i capture that failed alert in my test case, so i know that the alert is shown and the website is right?

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [September 4, 2019, 4:15am UTC](https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532/4 "2019-09-04T04:15:19Z")

</div>

I didn’t send you that link just for the sake of it… I need more information!

Example: is the “alert” you mention a `window.alert()` message? Or is it a popup dialog constructed with JavaScript and HTML?

Go through that link, read it all, and post everything relevant to your question.

If you had followed the advice in that link I sent, you wouldn’t have wasted my time or your own. One thing I know for sure, as I write this, no one, _including you_, has clicked on that link.

---

<div class="post-metadata">

**Author:** ![Vijay\_Singh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/vijay_singh/32/23869_2.png) [@Vijay\_Singh](https://forum.katalon.com/u/Vijay_Singh)\
**Post date:** [September 4, 2019, 7:00pm UTC](https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532/5 "2019-09-04T19:00:24Z")

</div>

Handy, use browser inspect element and figure it out how that popup is thrown. Then based on that you will find the relevant solution .

---

<div class="post-metadata">

**Author:** ![francorebu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/francorebu/32/16103_2.png) [@francorebu](https://forum.katalon.com/u/francorebu)\
**Post date:** [September 4, 2019, 8:35pm UTC](https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532/6 "2019-09-04T20:35:48Z")

</div>

Could you take a screenshot when entering those invalid credentials? if the message appears on the html , could you please right click on that message and select inspect and take another screenshot of that html code. that would be userful.

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:40am UTC](https://forum.katalon.com/t/negative-login-test-in-katalon-studio/32532/7 "2022-08-08T07:40:02Z")

</div>

Archived on August 8, 2022, 7:40am UTC


