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

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived