I am completely new to development and automation so I've been playing around with Python and Selenium to fill out simple forms. The form I am using will detect existing email addresses in a Database so I need to know how to tell the program to use a unique email address on each automation test start. In this case, the email I want to use is huks214+(Randomvalue)@gmail.com and have that random value change each time I run the script. Below is a code snipit from Selenium
driver.find_element_by_id("Email_Address").send_keys("jhfggf@kjkj.com")
driver.find_element_by_id("Cnfm_Email_Address").click()
driver.find_element_by_id("Cnfm_Email_Address").clear()
driver.find_element_by_id("Cnfm_Email_Address").send_keys("jhfggf@kjkj.com")
This is inputting the email address as I entered it on the form when I recorded it. I have the below code which will change the email address but I'm unsure on how to integrate it into the above script
import string
import random
email = 'huks214+' + ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(10)) + '@gmail.com'
print (email)