I want to write a test in selenium python. This is what i would like to acheive.
Steps:
I would like to know if it is a good idea to login to gmail or outlook and click on each elements using browser. Is there any python library that i can use to achieve this without using a browser?
thanks in advance!
I belive the easiest way of getting the confirmation mail is using the module poplib
. Just receive the mails and look for the URL with a regular expression. The open is with urllib
.
Example from the docs:
import poplib
M = poplib.POP3("pop.gmail.com")
M.user("user")
M.pass_("pass")
numMessages = len(M.list()[1])
for i in range(numMessages):
for j in M.retr(i+1)[1]:
print j