# Assert / verify URL

**URL:** <https://forum.katalon.com/t/assert-verify-url/9100>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [August 8, 2017, 2:33pm UTC](https://forum.katalon.com/t/assert-verify-url/9100 "2017-08-08T14:33:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Smith](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Mark\_Smith](https://forum.katalon.com/u/Mark_Smith)\
**Post date:** [August 8, 2017, 2:33pm UTC](https://forum.katalon.com/t/assert-verify-url/9100/1 "2017-08-08T14:33:44Z")

</div>

Hello,  
is there any option to do assert/verify on a URL ?  
let say i clicking on object and want to verify i directed to a URL or even stayed on the same URL - how can i set it on Katalon ?

---

<div class="post-metadata">

**Author:** ![Chris\_Smith](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chris\_Smith](https://forum.katalon.com/u/Chris_Smith)\
**Post date:** [August 8, 2017, 2:33pm UTC](https://forum.katalon.com/t/assert-verify-url/9100/2 "2017-08-08T14:33:44Z")

</div>

Hello,  
is there any option to do assert/verify on a URL ?  
let say i clicking on object and want to verify i directed to a URL or even stayed on the same URL - how can i set it on Katalon ?

---

<div class="post-metadata">

**Author:** ![Oliver\_Howard](https://avatars.discourse-cdn.com/v4/letter/o/22d042/32.png) [@Oliver\_Howard](https://forum.katalon.com/u/Oliver_Howard)\
**Post date:** [August 8, 2017, 3:07pm UTC](https://forum.katalon.com/t/assert-verify-url/9100/3 "2017-08-08T15:07:06Z")

</div>

Hi there,

You can do it easily in Katalon Studio. We have a keyword called ‘Get Window Title’ and you can use it for assertion, e.g:  
assert WebUI.getWindowTitle() == ‘My Title’

Thanks

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
Thank you for choosing Katalon Studio as your automation solution.  
Your feedback is needed to make Katalon Studio a better tool, take the survey at: [https://goo.gl/S25NVO](https://goo.gl/S25NVO)

---

<div class="post-metadata">

**Author:** ![Sivasankaramalan\_Gun](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Sivasankaramalan\_Gun](https://forum.katalon.com/u/Sivasankaramalan_Gun)\
**Post date:** [February 5, 2018, 8:00pm UTC](https://forum.katalon.com/t/assert-verify-url/9100/4 "2018-02-05T20:00:49Z")

</div>

How to Assert username and password in Mobile?

---

<div class="post-metadata">

**Author:** ![Ana\_Hong](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ana\_Hong](https://forum.katalon.com/u/Ana_Hong)\
**Post date:** [February 6, 2018, 8:41am UTC](https://forum.katalon.com/t/assert-verify-url/9100/5 "2018-02-06T08:41:41Z")

</div>

> [Sivasankaramalan Gunasekarasivam](https://forum.katalon.com/profile/3036/Sivasankaramalan%20Gunasekarasivam "Link: /profile/3036/Sivasankaramalan%20Gunasekarasivam") said:
> 
> How to Assert username and password in Mobile?

Mobile is different. However you can use ‘Get Element Text’ in this case to get text of current element and compare it. So it should be:  
assert Mobile.getElementText(findTestObject(‘your/object’)) == yourValue

---

<div class="post-metadata">

**Author:** ![Eve](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/eve/32/10966_2.png) [@Eve](https://forum.katalon.com/u/Eve)\
**Post date:** [July 31, 2018, 6:36pm UTC](https://forum.katalon.com/t/assert-verify-url/9100/6 "2018-07-31T18:36:30Z")

</div>

If you want to ensure a link/test object opens to your intended URL, you can use getURL and VerifyMatch. Just remember if your link/testobject opens to a new tab to add switchTowindow before hand. Ex: CurrentURL is the URL variable to match to your intended URL “[google.com](http://google.com)”

WebUI.click(findTestObject(‘xxLINKxx’))  
CurrentUrL= WebUI.getUrl()

WebUI.verifyMatch(CurrentURL, ‘[https://www.google.com](https://www.google.com)’, false)

---

<div class="post-metadata">

**Author:** ![nini](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@nini](https://forum.katalon.com/u/nini)\
**Post date:** [October 4, 2018, 10:52am UTC](https://forum.katalon.com/t/assert-verify-url/9100/7 "2018-10-04T10:52:08Z")

</div>

why i can’t find getElementText in the autocomplete ?

---

<div class="post-metadata">

**Author:** ![rgreenhalge](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rgreenhalge](https://forum.katalon.com/u/rgreenhalge)\
**Post date:** [August 21, 2019, 10:51pm UTC](https://forum.katalon.com/t/assert-verify-url/9100/8 "2019-08-21T22:51:48Z")

</div>

This still throws the MissingMethodException even though it also shows that the strings match:

test  
`WebUI.VerifyMatch(WebUI.getUrl(), GlobalVariable.baseUrl, false)`

response  
`VerifyMatch() is applicable for argument types: (java.lang.String, java.lang.String, java.lang.Boolean)`  
`values: [http://localhost:8080/, http://localhost:8080/, false]`

---

<div class="post-metadata">

**Author:** ![uislam](https://avatars.discourse-cdn.com/v4/letter/u/b77776/32.png) [@uislam](https://forum.katalon.com/u/uislam)\
**Post date:** [January 14, 2020, 3:16am UTC](https://forum.katalon.com/t/assert-verify-url/9100/9 "2020-01-14T03:16:04Z")

</div>

Is there any way to do soft assert? so whats the difference between checkpoint and assert?

---

<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:39am UTC](https://forum.katalon.com/t/assert-verify-url/9100/10 "2022-08-08T07:39:17Z")

</div>


