Get and Validate page title

I.seePageTitle

Assert the title of the current page

Usage

I.seePageTitle(title)

Parameters

ParameterTypeRemarks
titlestringThe expected page title

Example(s)

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".


I.getPageTitle

Get the title of the current page.

Usage

I.getPageTitle()

Example(s)

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.

Last Updated: