I'd like to know how you can automate the registration process for a site that requires a unique email address or username each time, using Selenium IDE. My only thought would be to insert an appropriately formatted random string into the username or email field; this could be done easily with the Python or Java version of the test case code, but what about in the initial Selenium Core syntax?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
I normally just record all the steps then prefeace with some JS where i need it.. like...
Works best if you have a catch-all address configured for testing @domain.com..
Quick and dirty but does the job, and points dev's in the right direction for when they compile more re-usable test cases or add it to a framework..
Either one should work.
Generally I'd prefer my tests to always clean up after themselves, but sometimes it's hard to have that happen reliably.
If there's a lot of issues getting a cleanup step to run after tests that fail or something, then go for it at the start of the test.
If you want to actually receive an email (and you have a gmail account) with each test run, you can use something like this:
This is a variation of one of the answers for Stackoverflow Question.