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
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
|
show 1 more comment
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
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
|
show 1 more comment
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
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
selenium email
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
|
show 1 more comment
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
|
show 1 more comment
1 Answer
1
active
oldest
votes
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
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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