https://cypress.io logo
Verify a special character string
# i-need-help
q
I have to verify a special character string on a webpage on different elements using Cypress. Special character string is :
T!@$^()-_+, &_-=tt.Ø {y}[a] £ fi
Please find attached sample HTML page Whenever I try to verify the string I get below assertion error in Cypress:
AssertionError:Timed out retrying after 4000ms: Expected to find content: 'T!@$^()-+, &-=tt.Ø {y}[a] £ fi' within the element: <label> but never did.
Below is the code block:
Copy code
it('Verify Special characters', () => {
    cy.visit('public/special-character.html')
    
    cy.get('label').contains('T!@$^()-_+, &_-=tt.Ø {y}[a] £ fi');
    cy.get('p').contains('T!@$^()-_+, &_-=tt.Ø {y}[a] £ fi');
   
  })
https://cdn.discordapp.com/attachments/1100713482917265428/1100713483206668348/special-character.html