How to assert the title of a page

I want to make sure my test runs on the right page, by asserting the title of the page. In Selenium I used ‘assertTitle’. What options offer Katalon?

Works! Thanks a lot.

Ah very sorry, I miss () for getWindowTitle function

assert WebUI.getWindowTitle() == "Studentenwebsite Universiteit Leiden"

1 Like

Thank you Hanh Tran,

Can you explain your answer a little bit more in detail. I lack the experience with Katalon to get it to work. I put in the script assert WebUI.getWindowTitle == "Studentenwebsite Universiteit Leiden". In the console I constantly get the error message: 'test case failed because (of) Variable ‘getWindowTitle’ is not defined. I tried to define a variable, but with no success. Please advice?

This is what I want to accomplish, in short:


Assert title of the page: Studentenwebsite Universiteit Leiden


Thanks in advance for your reply.

You can do it using ‘Get Window Title’ keyword, e.g:

assert WebUI.getWindowTitle == "Expected title"

We can use testng asserts in katalon studio
You can follow below tutorial
Katalon Tutorials: