Issue: During the application process, I encounter a dilemma when prompted to input an email address and confirm it in a separate text field.
To automate this task, I rely on webdriverJS for coding. My approach involves generating a random email address using the script demonstrated below:
var chars = 'abcdefghijklmnopqrstuvwxyz'
return $browser.findElement($driver.By.id("brokers_register_main_broker_username")).sendKeys(chars[Math.floor(Math.random()*26)] + Math.random().toString(36).substring(2,11) + '@random.com');
The challenge lies in extracting the randomly generated email address and populating it into the designated (confirm email address) text field.
If you have any insights or suggestions to resolve this issue, I would greatly appreciate your help. I have invested significant time attempting to troubleshoot this problem with limited success. Any guidance or recommendations would be highly valued. Thank you.