Selenium creating bulk email addresses The Next CEO of Stack OverflowSending email in .NET through GmailHow to validate an email address in JavaScript?How to validate an email address using a regular expression?What is the maximum length of a valid email address?C# code to validate email addressWhat characters are allowed in an email address?Can I set subject/content of email using mailto:?How do the server distinguish whether it is a robot or a human when using selenium webdriver to crawl web pages?python - Find email address on page with seleniumSET ERROR IGNORE Python selenium

Should I tutor a student who I know has cheated on their homework?

Does Germany produce more waste than the US?

A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See

Math-accent symbol over parentheses enclosing accented symbol (amsmath)

Dominated convergence theorem - what sequence?

Why the difference in type-inference over the as-pattern in two similar function definitions?

Why do remote US companies require working in the US?

Is micro rebar a better way to reinforce concrete than rebar?

Writing differences on a blackboard

When you upcast Blindness/Deafness, do all targets suffer the same effect?

Why is my new battery behaving weirdly?

Are police here, aren't itthey?

Make solar eclipses exceedingly rare, but still have new moons

How many extra stops do monopods offer for tele photographs?

Why does standard notation not preserve intervals (visually)

What does "Its cash flow is deeply negative" mean?

How to edit “Name” property in GCI output?

Would a completely good Muggle be able to use a wand?

Why did CATV standarize in 75 ohms and everyone else in 50?

Won the lottery - how do I keep the money?

How to avoid supervisors with prejudiced views?

Can you be charged for obstruction for refusing to answer questions?

Easy to read palindrome checker

Why is quantifier elimination desirable for a given theory?



Selenium creating bulk email addresses



The Next CEO of Stack OverflowSending email in .NET through GmailHow to validate an email address in JavaScript?How to validate an email address using a regular expression?What is the maximum length of a valid email address?C# code to validate email addressWhat characters are allowed in an email address?Can I set subject/content of email using mailto:?How do the server distinguish whether it is a robot or a human when using selenium webdriver to crawl web pages?python - Find email address on page with seleniumSET ERROR IGNORE Python selenium










-1















I want to use selenium to create several email addresses at once. I suppose they can be random but I already have a list of the email account names I want to create.



I know how to create 1 email using webdriver but how would I go about it if I want to sign up several, one after the other automatically, without having to always change the code?



Simple code for creating 1 email:



from selenium import webdriver
import time

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
time.sleep(2)

driver.find_element_by_id('MemberName').send_keys('usernameexample')
time.sleep(1)

driver.find_element_by_id('iSignupAction).click()
time.sleet(2)

driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
time.sleep(1)

driver.find_element_by_id('iSignupAction').click()
time.sleep(2)

driver.find_element_by_id('FirstName').send_keys('john')
time.sleep(1)

driver.find_element_by_id('LastName').send_keys('wayne')
time.sleep(1)

driver.find_element_by_id('iSignupAction').click()









share|improve this question
























  • Post the code you have tried.

    – Ryan Wilson
    Mar 8 at 15:53











  • If you can create one than run your code in loop, again agree with @RyanWilson share your code for better answer.

    – Jitendra Banshpal
    Mar 8 at 16:10












  • I would recommend you to post a code here + I would store it in a file and then parse it, by itteratin though this file :)

    – StyleZ
    Mar 8 at 16:50











  • Posted what I have. Very new to selenium but this basic code worked okay.

    – johnboy
    Mar 8 at 17:04











  • Not sure why getting downvoted here. I'm new to this forum so if I should change anything in my post I would be happy to.

    – johnboy
    Mar 8 at 19:17















-1















I want to use selenium to create several email addresses at once. I suppose they can be random but I already have a list of the email account names I want to create.



I know how to create 1 email using webdriver but how would I go about it if I want to sign up several, one after the other automatically, without having to always change the code?



Simple code for creating 1 email:



from selenium import webdriver
import time

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
time.sleep(2)

driver.find_element_by_id('MemberName').send_keys('usernameexample')
time.sleep(1)

driver.find_element_by_id('iSignupAction).click()
time.sleet(2)

driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
time.sleep(1)

driver.find_element_by_id('iSignupAction').click()
time.sleep(2)

driver.find_element_by_id('FirstName').send_keys('john')
time.sleep(1)

driver.find_element_by_id('LastName').send_keys('wayne')
time.sleep(1)

driver.find_element_by_id('iSignupAction').click()









share|improve this question
























  • Post the code you have tried.

    – Ryan Wilson
    Mar 8 at 15:53











  • If you can create one than run your code in loop, again agree with @RyanWilson share your code for better answer.

    – Jitendra Banshpal
    Mar 8 at 16:10












  • I would recommend you to post a code here + I would store it in a file and then parse it, by itteratin though this file :)

    – StyleZ
    Mar 8 at 16:50











  • Posted what I have. Very new to selenium but this basic code worked okay.

    – johnboy
    Mar 8 at 17:04











  • Not sure why getting downvoted here. I'm new to this forum so if I should change anything in my post I would be happy to.

    – johnboy
    Mar 8 at 19:17













-1












-1








-1








I want to use selenium to create several email addresses at once. I suppose they can be random but I already have a list of the email account names I want to create.



I know how to create 1 email using webdriver but how would I go about it if I want to sign up several, one after the other automatically, without having to always change the code?



Simple code for creating 1 email:



from selenium import webdriver
import time

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
time.sleep(2)

driver.find_element_by_id('MemberName').send_keys('usernameexample')
time.sleep(1)

driver.find_element_by_id('iSignupAction).click()
time.sleet(2)

driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
time.sleep(1)

driver.find_element_by_id('iSignupAction').click()
time.sleep(2)

driver.find_element_by_id('FirstName').send_keys('john')
time.sleep(1)

driver.find_element_by_id('LastName').send_keys('wayne')
time.sleep(1)

driver.find_element_by_id('iSignupAction').click()









share|improve this question
















I want to use selenium to create several email addresses at once. I suppose they can be random but I already have a list of the email account names I want to create.



I know how to create 1 email using webdriver but how would I go about it if I want to sign up several, one after the other automatically, without having to always change the code?



Simple code for creating 1 email:



from selenium import webdriver
import time

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
time.sleep(2)

driver.find_element_by_id('MemberName').send_keys('usernameexample')
time.sleep(1)

driver.find_element_by_id('iSignupAction).click()
time.sleet(2)

driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
time.sleep(1)

driver.find_element_by_id('iSignupAction').click()
time.sleep(2)

driver.find_element_by_id('FirstName').send_keys('john')
time.sleep(1)

driver.find_element_by_id('LastName').send_keys('wayne')
time.sleep(1)

driver.find_element_by_id('iSignupAction').click()






selenium email






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 20:10









orde

4,81762533




4,81762533










asked Mar 8 at 15:47









johnboyjohnboy

61




61












  • Post the code you have tried.

    – Ryan Wilson
    Mar 8 at 15:53











  • If you can create one than run your code in loop, again agree with @RyanWilson share your code for better answer.

    – Jitendra Banshpal
    Mar 8 at 16:10












  • I would recommend you to post a code here + I would store it in a file and then parse it, by itteratin though this file :)

    – StyleZ
    Mar 8 at 16:50











  • Posted what I have. Very new to selenium but this basic code worked okay.

    – johnboy
    Mar 8 at 17:04











  • Not sure why getting downvoted here. I'm new to this forum so if I should change anything in my post I would be happy to.

    – johnboy
    Mar 8 at 19:17

















  • Post the code you have tried.

    – Ryan Wilson
    Mar 8 at 15:53











  • If you can create one than run your code in loop, again agree with @RyanWilson share your code for better answer.

    – Jitendra Banshpal
    Mar 8 at 16:10












  • I would recommend you to post a code here + I would store it in a file and then parse it, by itteratin though this file :)

    – StyleZ
    Mar 8 at 16:50











  • Posted what I have. Very new to selenium but this basic code worked okay.

    – johnboy
    Mar 8 at 17:04











  • Not sure why getting downvoted here. I'm new to this forum so if I should change anything in my post I would be happy to.

    – johnboy
    Mar 8 at 19:17
















Post the code you have tried.

– Ryan Wilson
Mar 8 at 15:53





Post the code you have tried.

– Ryan Wilson
Mar 8 at 15:53













If you can create one than run your code in loop, again agree with @RyanWilson share your code for better answer.

– Jitendra Banshpal
Mar 8 at 16:10






If you can create one than run your code in loop, again agree with @RyanWilson share your code for better answer.

– Jitendra Banshpal
Mar 8 at 16:10














I would recommend you to post a code here + I would store it in a file and then parse it, by itteratin though this file :)

– StyleZ
Mar 8 at 16:50





I would recommend you to post a code here + I would store it in a file and then parse it, by itteratin though this file :)

– StyleZ
Mar 8 at 16:50













Posted what I have. Very new to selenium but this basic code worked okay.

– johnboy
Mar 8 at 17:04





Posted what I have. Very new to selenium but this basic code worked okay.

– johnboy
Mar 8 at 17:04













Not sure why getting downvoted here. I'm new to this forum so if I should change anything in my post I would be happy to.

– johnboy
Mar 8 at 19:17





Not sure why getting downvoted here. I'm new to this forum so if I should change anything in my post I would be happy to.

– johnboy
Mar 8 at 19:17












1 Answer
1






active

oldest

votes


















0














As others have pointed out, you could iterate over a data collection, such as an array:



array_of_usernames = ['username_one', 'username_two']

array_of_usernames.each do |username|

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
driver.find_element_by_id('MemberName').send_keys("#username") #INTERPOLATED BLOCK-LOCAL VARIABLE HERE
driver.find_element_by_id('iSignupAction).click()
driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
driver.find_element_by_id('iSignupAction').click()
driver.find_element_by_id('FirstName').send_keys('john')
driver.find_element_by_id('LastName').send_keys('wayne')
driver.find_element_by_id('iSignupAction').click()

# some step to log out so that next username can register

end


If you aren't familiar with arrays or iteration, then I'd suggest looking at the docs to get your head around it: https://ruby-doc.org/core-2.6.1/Array.html#method-i-each






share|improve this answer























  • Thank you so much! All I wanted was a bit of advice on what would be the best way to go about something like this and this is a huge help. Wish I could upvote your comment!

    – johnboy
    Mar 8 at 20:58











  • Glad it helped. If it solved your issue, you can accept the answer. Good luck!

    – orde
    Mar 8 at 21:47











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066626%2fselenium-creating-bulk-email-addresses%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














As others have pointed out, you could iterate over a data collection, such as an array:



array_of_usernames = ['username_one', 'username_two']

array_of_usernames.each do |username|

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
driver.find_element_by_id('MemberName').send_keys("#username") #INTERPOLATED BLOCK-LOCAL VARIABLE HERE
driver.find_element_by_id('iSignupAction).click()
driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
driver.find_element_by_id('iSignupAction').click()
driver.find_element_by_id('FirstName').send_keys('john')
driver.find_element_by_id('LastName').send_keys('wayne')
driver.find_element_by_id('iSignupAction').click()

# some step to log out so that next username can register

end


If you aren't familiar with arrays or iteration, then I'd suggest looking at the docs to get your head around it: https://ruby-doc.org/core-2.6.1/Array.html#method-i-each






share|improve this answer























  • Thank you so much! All I wanted was a bit of advice on what would be the best way to go about something like this and this is a huge help. Wish I could upvote your comment!

    – johnboy
    Mar 8 at 20:58











  • Glad it helped. If it solved your issue, you can accept the answer. Good luck!

    – orde
    Mar 8 at 21:47















0














As others have pointed out, you could iterate over a data collection, such as an array:



array_of_usernames = ['username_one', 'username_two']

array_of_usernames.each do |username|

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
driver.find_element_by_id('MemberName').send_keys("#username") #INTERPOLATED BLOCK-LOCAL VARIABLE HERE
driver.find_element_by_id('iSignupAction).click()
driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
driver.find_element_by_id('iSignupAction').click()
driver.find_element_by_id('FirstName').send_keys('john')
driver.find_element_by_id('LastName').send_keys('wayne')
driver.find_element_by_id('iSignupAction').click()

# some step to log out so that next username can register

end


If you aren't familiar with arrays or iteration, then I'd suggest looking at the docs to get your head around it: https://ruby-doc.org/core-2.6.1/Array.html#method-i-each






share|improve this answer























  • Thank you so much! All I wanted was a bit of advice on what would be the best way to go about something like this and this is a huge help. Wish I could upvote your comment!

    – johnboy
    Mar 8 at 20:58











  • Glad it helped. If it solved your issue, you can accept the answer. Good luck!

    – orde
    Mar 8 at 21:47













0












0








0







As others have pointed out, you could iterate over a data collection, such as an array:



array_of_usernames = ['username_one', 'username_two']

array_of_usernames.each do |username|

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
driver.find_element_by_id('MemberName').send_keys("#username") #INTERPOLATED BLOCK-LOCAL VARIABLE HERE
driver.find_element_by_id('iSignupAction).click()
driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
driver.find_element_by_id('iSignupAction').click()
driver.find_element_by_id('FirstName').send_keys('john')
driver.find_element_by_id('LastName').send_keys('wayne')
driver.find_element_by_id('iSignupAction').click()

# some step to log out so that next username can register

end


If you aren't familiar with arrays or iteration, then I'd suggest looking at the docs to get your head around it: https://ruby-doc.org/core-2.6.1/Array.html#method-i-each






share|improve this answer













As others have pointed out, you could iterate over a data collection, such as an array:



array_of_usernames = ['username_one', 'username_two']

array_of_usernames.each do |username|

url = 'https://hotmail.com/'

driver = webdriver.Chrome('/C:Users/Desktop/chromedriver')
driver.get(url)

driver.find_element_by_xpath("//a[contains(@class, 'linkButtonSigninHeader')]/@href").click()
driver.find_element_by_id('MemberName').send_keys("#username") #INTERPOLATED BLOCK-LOCAL VARIABLE HERE
driver.find_element_by_id('iSignupAction).click()
driver.find_element_by_id('PasswordInput').send_keys('Passwordexample1')
driver.find_element_by_id('iSignupAction').click()
driver.find_element_by_id('FirstName').send_keys('john')
driver.find_element_by_id('LastName').send_keys('wayne')
driver.find_element_by_id('iSignupAction').click()

# some step to log out so that next username can register

end


If you aren't familiar with arrays or iteration, then I'd suggest looking at the docs to get your head around it: https://ruby-doc.org/core-2.6.1/Array.html#method-i-each







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 8 at 20:15









ordeorde

4,81762533




4,81762533












  • Thank you so much! All I wanted was a bit of advice on what would be the best way to go about something like this and this is a huge help. Wish I could upvote your comment!

    – johnboy
    Mar 8 at 20:58











  • Glad it helped. If it solved your issue, you can accept the answer. Good luck!

    – orde
    Mar 8 at 21:47

















  • Thank you so much! All I wanted was a bit of advice on what would be the best way to go about something like this and this is a huge help. Wish I could upvote your comment!

    – johnboy
    Mar 8 at 20:58











  • Glad it helped. If it solved your issue, you can accept the answer. Good luck!

    – orde
    Mar 8 at 21:47
















Thank you so much! All I wanted was a bit of advice on what would be the best way to go about something like this and this is a huge help. Wish I could upvote your comment!

– johnboy
Mar 8 at 20:58





Thank you so much! All I wanted was a bit of advice on what would be the best way to go about something like this and this is a huge help. Wish I could upvote your comment!

– johnboy
Mar 8 at 20:58













Glad it helped. If it solved your issue, you can accept the answer. Good luck!

– orde
Mar 8 at 21:47





Glad it helped. If it solved your issue, you can accept the answer. Good luck!

– orde
Mar 8 at 21:47



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066626%2fselenium-creating-bulk-email-addresses%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page