My problem is I created two methods that will generate a random first name and random last name from the arrays of names. When the test executes the first and the last name methods, I want to somehow get those two values and combine them into an email in the specific format -> "firstName.lastName@gmail.com".
But I don't know how to do it and I can't find the answer that works. Keep in mind I work in Cypress for a few days. Below is the photo of the fields and HTML of the element (both are the same in terms of where the value is stored).
function generateEmail(){
var email = cy.get("input[placeholder='Enter first name']") + "." +
cy.get("input[placeholder='Enter last name']") + "@gmail.com"
return email
}
I don't know what to use in order to get the text from the value attribute.