There is a text field in which I enter random data and save the form, now I want to click the edit button on the basis of that value which consists of a random value
how I enter a random value in the text field and save it in a variable.
function Alpha_Numeric() {
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 5; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
Calling variable
cy.contains('td',text).get('#work_order_edit').click()
Instead of click the specific element the pointer click on random vale in the table
