-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing the <head> content - possible? #624
Comments
You should be able to access anything on the document as described here https://docs.cypress.io/api/commands/document.html#Examples |
@bkucera Thank you, Ben, it wasn't clear to me from reading the docs. Now, after your explanation, I've got this working example:
As correctly noticed by @bkucera below, this should be simplified as follows:
|
@tivnet the cy.get('head meta[name="description"]')
.should("have.attr", "content", "Here goes the description..."); |
Indeed. Do not know why it did not work for me. Do not even need the "head" part. Thank you! |
Dear Cypress,
I am having trouble finding any mentioning of testing the HEAD content, besides the
title
. Specifically, check the META DESCRIPTION?Highly appreciate if you point me to a doc page.
Thank you!
The text was updated successfully, but these errors were encountered: