Skip to main content

Generate Email Address

def gen_email(prefix: str) -> str

This custom command creates an email address based on a prefix string, which will be added to the beginning of the email address. The prefix is used to identify a specific participant within the test, such as their name or ID. The generated email address will have the format of {prefix}-{runID}@{domain}. The "runID" and "domain" parts of the email address will be automatically filled in.


Manually formatting email address in this format is not recommended, as it may lead to errors in the test. Use this custom command instead.

def test(driver: TestUIDriver):
addr = gen_email("test")
print("Generated email address:", addr)