2

This is the code I have used so far:

username = browser.find_element_by_id("field67041336")
email = browser.find_element_by_id("field67041337")
mobile = browser.find_element_by_id("field67041338")
postal = browser.find_element_by_id("field67041339")

username.send_keys("YourUsername")
email.send_keys("1234@dominus")
mobile.send_keys("020 7946 0018")
postal.send_keys("WC2N 5DU")

browser.find_element_by_id("fsSubmitButton3142464").click()

So I have a catchall domain and I want to be able to input random numbers in front of the catchall. So like for one account the email is 1234@dominus and the next account is 12345@dominus and so on and so forth. Anyway to do this?

Side Note: IDK if I can ask multiple questions in the same post so if I cant, im sorry. I want to loop this but I want the user to be able to define how many times they want it to loop. Anyone done this before?

  • I didn't get your exact question, what are you asking? you want to pass random email's in your username field? If this is the case... You can generate random email ID in Excel using Excel formula... and use it in your code... Every time it will generates a new unique email id. – Bharat Mane Aug 1 '18 at 9:56
  • never mind I got help from someone else. I can share the solution here – warkun5400 Aug 1 '18 at 10:11
1

Found a solution from someone I met:
In the original code (which you cant see because of the edits) I needed to replace catchall = and the line under that with:

catchall = (str(random.randint(1, 9999)) + '@' + str(input()))

I basically forgot to redefine it.

  • That's for the main problems. Still could use some help with the loop bit (see Side Note) – warkun5400 Aug 1 '18 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.