description |
---|
Learn how to use the I.seePageTitle command to assert the title of the current page in your UIlicious test. |
Assert the title of the current page
I.seePageTitle(title)
Parameters
Parameter | Type | Remarks |
---|---|---|
title | string | The expected page title |
I.goTo("https://www.wikipedia.org/")
I.seePageTitle("Wikipedia")
This example test navigates to the https://www.wikipedia.org/
and checks if the page title is "Wikipedia". The test will pass if the page title is exactly "Wikipedia".
Get the title of the current page.
I.getPageTitle()
I.goTo("https://www.wikipedia.org/")
var pageTitle = I.getPageTitle() // The returned value will be "Wikipedia"
This example test navigates to the https://www.wikipedia.org/
and reads the current title of the page to the pageTitle
variable.