Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.28 KB

get-and-validate-page-title.md

File metadata and controls

51 lines (34 loc) · 1.28 KB
description
Learn how to use the I.seePageTitle command to assert the title of the current page in your UIlicious test.

Get and Validate page title

I.seePageTitle

Assert the title of the current page

Usage

I.seePageTitle(title)

Parameters

Parameter Type Remarks
title string The 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.