Hello All,
I need to validate the dynamic value in Assertion, any idea how we can do that?
Example:
1. Creating 1 Random Number using Math.Random()
2. Storing that value in 1 Variable
3. After processing the data need to validate that Random Number in Assertion.
Currently using cy.contains() but its failing for me.
g
gray-kilobyte-89541
05/14/2023, 11:49 AM
What is the test you are trying to code? Right now it is not enough information to help
c
colossal-table-38461
05/14/2023, 3:09 PM
Hello @gray-kilobyte-89541 ,
Its E2E flow which I am testing
need to assign the roleNumber in between 1-20
so using Math.Random creating that
& same need to validate in assertion from table
so using cy.contains ('td', "The Role Number is ...")
Using same variable which is created to store that RoleNumber