seeLink
Verifies that a link with the given text exists on the current page.
Can also take an optional url parameter. If provided, it verifies the link found has the given url.
Arguments
| Name |
Type |
Required |
Default |
Description |
| text |
string |
true |
|
The expected text of the link. |
| url |
string |
false |
|
The expected url of the link. |
Examples
it( "can verify a link exists", function() {
this.visit( "/" )
.seeLink( "Contact Us" );
} );
it( "can verify a link with a specific url exists", function() {
this.visit( "/" )
.seeLink( "Contact Us", "/contact-us" );
} );