Simple Steps:
1. Go to http://mail.google.com
2. Enter your user name 'yourgmailid'
3. Enter your password 'yourpassword'
4. Login
5. Goto Sent mail
6. Logout
Simple Code:
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver= webdriver.Chrome("E:\QA\Resource\WEBDRIVER\chromedriverserver\chromedriver.exe")
driver.get("http://mail.google.com")
emailid=driver.find_element_by_id("Email")
emailid.send_keys("yourgmailid")
passw=driver.find_element_by_id("Passwd")
passw.send_keys("yourpassword")
signin=driver.find_element_by_id("signIn")
signin.click()
time.sleep(10)
driver.switch_to_frame('canvas_frame')
sentmail= driver.find_element_by_link_text('Sent Mail')
sentmail.click()
time.sleep(10)
sentmail= driver.find_element_by_link_text('Your Name')
sentmail.click()
lout= driver.find_element_by_link_text('Sign out')
lout.click()
Simple explanation:
driver= webdriver.Chrome("E:\QA\Resource\WEBDRIVER\chromedriverserver\chromedriver.exe")
can also use
driver= webdriver.Firefox() or
driver= webdriver.Ie()
Choose your destination:
driver.get("http://mail.google.com")
Find element:
emailid=driver.find_element_by_id("Email")
how?
<input id="Email" type="text" value="" name="Email" spellcheck="false">
or?
<input id="Email" type="text" value="" name="Email" spellcheck="false">
emailid=driver.find_element_by_name("Email")
more? YES
find_element_by_xpath
find_element_by_css_selector
find_element_by_class_name
find_element_by_link_text
etc
Enter text:
remember from selenium.webdriver.common.keys import Keys?
emailid.send_keys("yourgmailid")
Handle iframe:
driver.switch_to_frame('canvas_frame')
How?<iframe id="canvas_frame" class="cO" frameborder="0" title="main" src="?ui=2&view=bsp&ver=ohhl4rw8mbn4" name="c1uzah0zrv218y">
For first part visit Hello World! WebDriver with Python on Win 7
For first part visit Hello World! WebDriver with Python on Win 7
This comment has been removed by the author.
ReplyDeleteWrong comment earlier. Very good initiative :)
ReplyDeleteThanks a lot
ReplyDeleteI used these lines in ruby:
ReplyDelete@selenium = Selenium::SeleniumDriver.new 'localhost' , 4444, '*firefox' , 'http://www.gmail.com' , 10000
@selenium.type "Email", "yourid"
@selenium.type "Passwd", "yourpassword"
@selenium.click "//input[@value='Sign in']"
@selenium.wait_for_page_to_load "30000"
sleep 5
@selenium.click "link=Sent Mail"
@selenium.click "link=yourprofilename"
@selenium.click "link=Sign out"
@selenium.wait_for_page_to_load "30000"
Good initiative bhaiya (Y)
ReplyDeleteআল আরমান I guess you are using Selenium RC, right?
ReplyDeleteFor Webdriver ruby bindings
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :firefox
by the way after 'sleep 5'
ReplyDeleteyou need to select iframe 'canvas_frame', when exporting code from IDE this part always skipped. :)
Merci
ReplyDeleteaswqergh
Probably one of the most talked about stores in Paris,Isabel Marant Sneakers
wesofttech.com Call 1-888-505-6485 (Toll Free) for Gmail Technical Support.Gmail Password Recovery, Gmail Tech Support, Gmail support number and Gmail Help etc.
ReplyDeleteVisit Link- Gmail Support
hi thanks to this writer for this nice blog and this good information
ReplyDeleteother useful link - Gmail Tech Support
I have a smart solution for this using Selenium IDE. I could go to composer text area by just using its class (class=editable LW-avf). For detailed article, please refer to http://www.seleniumhq.in/2013/04/automatically-login-to-gmail-and-send.html
ReplyDeletewesofttech.com Call 1-888-505-6485 (Toll Free) for Gmail Technical Support.Gmail Password Recovery, Gmail Tech Support, Gmail support number and Gmail Help etc.
ReplyDeleteTo get Gmail Technical Support ,Please visit the link.
Thankyou
Lacy Brown
mm nice post but... when i tried to switch to"canvas_frame" its throwing an error "Unable to locate frame: canvas_frame" you got any other solution for this....
ReplyDeleteThis is a really good read for me.I like the way you describe all the things and the examples.Thanks.
ReplyDeleteVisit:- Gmail Help
hai, i am getting the login pageand my email id is been entered, and the code is getting strucked at password, and not moving further,and even i checked with Next.Click() also, can u help me over this.
ReplyDeletethe code i added a bit is as below
emailid=driver.find_element_by_id("Email")
emailid.send_keys("sujithkumar446@gmail.com")
Next = driver.find_element_by_id("Next")
Next.click()
passw=driver.find_element_by_id("Passwd")
passw.send_keys("XXXXXXXXXXX")
and getting a traceback error at password and now after adding the Next i am stucking at Next itself
text_area = driver.find_element_by_name('Email')
Deletetext_area.send_keys("email...")
time.sleep(1)
google_button = driver.find_element_by_id('next')
google_button.click()
time.sleep(1)
text_area = driver.find_element_by_name('Passwd')
text_area.send_keys("pass...")
time.sleep(1)
google_button = driver.find_element_by_id('signIn')
google_button.click()
I just see the post i am so happy the post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be subscribing to your feed and I hope you post again soon.
ReplyDeleteDigital Marketing Training in Chennai
Yes. thank you so much. and now i show you how to login hotmail account http://howtoget.wiki/hotmail-login-hotmail-sign-up/
ReplyDeleteThis comment has been removed by the author.
ReplyDeletehttps://stitchclothes.com here we stitch clothes as per your design and selction
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.
ReplyDeletemsn.com hotmail sign in
ReplyDeleteIts really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....
Shriram Magizhchi
Shriram Magizhchi Guduvancheri
Shriram Magizhchi price
Shriram Magizhchi Guduvancheri Chennai
Shriram Magizhchi apartments
Shriram Magizhchi flats
Shriram Magizhchi review
Robotic Process Automation (RPA) is one of the most exciting developments in Business Process Management (BPM) in recent history. Some industry experts believe it may be even more transformational than cloud computing transformational than cloud Automationminds team. (RPA)Automationminds lets you program in (RPA),
ReplyDeleteThanks Admin for sharing such a useful post, I hope it’s useful to many individuals for developing their skill to get good career.
ReplyDeletepython training in chennai
python course in chennai
python training in bangalore
Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
ReplyDeleteJava training in Chennai | Java training institute in Chennai | Java course in Chennai
Java training in Bangalore | Java training in Electronic city
Java training in Bangalore | Java training in Marathahalli
Java training in Bangalore | Java training in Btm layout
Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this
ReplyDeleteAWS Training in Pune with placements | Best AWS Training in Pune | aws training institute in pune | Best AWS Training in Pune |aws training in pune pimple saudagar
Advanced AWS Online Training Institute in india | Best Online AWS Certification Course in india
aws Training in Pune kharadi | Best AWS Training in Pune |aws training in pune pimple saudagar
To automate gmail application and send email using attachment below article can help.
ReplyDeleteIn this article below operations are completed:
1) Launch chrome browser
2) Open Gmail URL
3) Enter Email ID and Password
4) Navigate to INBOX
5) Click on Compose email and enter details with attachment
6) Send email.
Link to article: http://mundrisoft.com/tech-bytes/automate-gmail-login-process-using-selenium/
A fantastic blog with a lot of useful information. I would like to get updates from you. Keep blogging. All the best.
ReplyDeleteIt really helps me to counteracts the technical issues that I have been facing with my Gmail Error code issues for a while. Do you Recover Gmail Error code recently and unable to recover your account? Call us at Gmail live chat and get every possible detail in that regard. Your issues will be handled by certified professionals.
Nice Post! Thank you for sharing very good post, it was so Nice to read and useful to improve my knowledge as updated one, keep blogging...
ReplyDeleteaws training in chennai | aws training in annanagar | aws training in omr | aws training in porur | aws training in tambaram | aws training in velachery
Nice Post! Thank you for sharing very good post, it was so Nice to read and useful to improve my knowledge as updated one, keep blogging...
ReplyDeleteAWS training in Chennai
AWS Online Training in Chennai
AWS training in Bangalore
AWS training in Hyderabad
AWS training in Coimbatore
AWS training
nice blog...
ReplyDeletejava training in chennai
java training in omr
aws training in chennai
aws training in omr
python training in chennai
python training in omr
selenium training in chennai
selenium training in omr
Thanks for your informative article,Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.
ReplyDeleteangular js training in chennai
angular js training in porur
full stack training in chennai
full stack training in porur
php training in chennai
php training in porur
photoshop training in chennai
photoshop training in porur
Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
ReplyDeleteangular js training in chennai
angular js training in velachery
full stack training in chennai
full stack training in velachery
php training in chennai
php training in velachery
photoshop training in chennai
photoshop training in velachery
Great efforts for making this blog useful one. Keep posting.
ReplyDeleteangular js training in chennai
angular js training in annanagar
full stack training in chennai
full stack training in annanagar
php training in chennai
php training in annanagar
photoshop training in chennai
photoshop training in annanagar
A big thank you for your blog article.Much thanks again. Awesome.
ReplyDeleteHyperion Fdqm online training
Hyperion Fdqm training
Hyperion Financial Management online training
Hyperion Financial Management training
Hyperion online training
Hyperion training
Hyperion planning online training
Hyperion planning training
Excellent and very cool idea and great content of different kinds of the valuable information's.
ReplyDeleteApache Spark Training in Pune
Python Classes in Pune
It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog.
ReplyDeleteAws Training in Chennai
Aws Training in Velachery
Aws Training in Tambaram
Aws Training in Porur
Aws Training in Omr
Aws Training in Annanagar
Yeni Perde Modelleri
ReplyDeleteMOBİL ONAY
mobil ödeme bozdurma
nft nasıl alınır
Ankara Evden Eve Nakliyat
trafik sigortasi
DEDEKTOR
web sitesi kurma
aşk kitapları
شركة تنظيف مجالس الدمام
ReplyDeletesmm panel
ReplyDeletesmm panel
iş ilanları
İnstagram takipçi satın al
hırdavatçı
beyazesyateknikservisi.com.tr
Servis
tiktok jeton hilesi