I.amAt

Assert that the current page is at a given URL.

Full URL or partial URL can be given.

Usage

I.amAt(url)
Parameter Type Remarks
url string URL to verify

# Absolute URL

I.amAt("http://mystore.com")
Matches Does not match
http://mystore.com https://mystore.com

# Without protocol

I.amAt("://mystore.com")
Matches Does not match
http://mystore.com
https://mystore.com
http://istore.com

# Path

I.amAt("/shoes")
Matches Does not match
http://storeA.com/shoes
http://storeB.com/shoes
http://storeA.com
http://storeA.com/bags

# Query string

I.amAt("?color=blue")
Matches Does not match
http://storeA.com/shoes?color=blue
http://storeA.com/bags?color=blue
http://storeA.com/shoes
http://storeA.com/bags?color=red

# Hash

I.amAt("#sale")
Matches Does not match
http://storeA.com/shoes#sale
http://storeA.com/bags#sale
http://storeA.com/shoes
http://storeA.com/bags#new