Display results as :

Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara


Send email automatically

View previous topic View next topic Go down

Send email automatically

Post by dkpune on Sat Mar 24, 2012 2:49 am

I want to send an email (from outlook) automatically from script when smoke test is compelted. Please share the java code which can be used in Selenium.


Posts : 6
Join date : 2012-03-14

Back to top Go down

Re: Send email automatically

Post by rohit13 on Tue Apr 10, 2012 3:31 pm

I don't have idea regarding mail functionality by outlook but here is code for Gmail

Just need to add code at the end of your script, n it will send email.

public class email extends SeleneseTestCase {
    public void setUp() throws Exception {
        selenium = new DefaultSelenium("localhost", 4444, "*chrome", "");

    public void testEmail() throws Exception {"");
        selenium.type("id=Email", "test");
        selenium.type("id=Passwd", "test");"id=signIn");
        selenium.clickAt("//div[@id=':oy']/div/div", "");
        selenium.type("name=to", "");
        selenium.type("name=subject", "testSubject");
        selenium.type("css=body[class='editable  LW-avf']", "asdasd");
        selenium.keyPress("//div/b[text()='Send']", "13");

    public void tearDown() throws Exception {

Hope it will work for you..

Radical QA

Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA

Back to top Go down

Re: Send email automatically

Post by tarun3kumar on Thu Apr 12, 2012 1:29 pm

A better approach could be to use build tool like ant to send email of test results. I assume that you are not using any CI system else it would have been way easier.
You could find more on ant mail task here -

Tarun K
Free Selenium Training


Posts : 186
Join date : 2012-02-14

Back to top Go down

Re: Send email automatically

Post by Sponsored content

Sponsored content

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum