Gmail automation

已查看 174 次
跳至第一个未读帖子

p.magist...@gmail.com

未读,
2014年12月18日 05:13:272014/12/18
收件人 seleniu...@googlegroups.com
i want to automate gmail gui, everything is fine (i can type  the addesses in the "To" text area and
Type the subject to the "Subject" input ) but i cannot get to body text area and type anything 

Could you help me ? 

Cheers,
Maciej

CH!NN@ K

未读,
2014年12月19日 04:08:362014/12/19
收件人 seleniu...@googlegroups.com
Hi Magisterka, It is working for me To and Subject input fields. Refer this link for gmail automation : http://techlearn.in/content/sikuli-and-selenium-scripts-composing-mail-gmail-using-selenium

---
Thanks & Regards,
Purushotham Karimbedu,
Druapl Developer and QA Engineer,
Website for Selenium : http://techlearn.in


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2360eeff-6131-457c-92db-e50fbf092089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ripon Al Wasim

未读,
2014年12月19日 04:22:022014/12/19
收件人 seleniu...@googlegroups.com
Hi Machiej,

what code did you try for that?

ripon

--

Bharat Pottipareddy

未读,
2014年12月19日 04:27:442014/12/19
收件人 seleniu...@googlegroups.com
Hi Machiej,

"CK Editor" recognition is tough with selenium. You may need to integrate with robotium or some other 3rd party tool to perform action on it.

Regards,
Bharat.P

Krishnan Mahadevan

未读,
2014年12月21日 01:10:302014/12/21
收件人 seleniu...@googlegroups.com
Maciej,
Why would you want to automate the Gmail GUI ?
Unless and until you are actually part of the google team that is responsible for building gmail application itself, I don’t see any reason why you should resort to taking a UI route for interacting with gmail mails, instead of resorting to using libraries such as JavaMail and access the emails via APIs. IMO that is going to give you a lot more better control with respect to what sort of operations you would want to do with respect to mails.

My 2 cents !

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


Dan Franko

未读,
2014年12月21日 15:57:302014/12/21
收件人 seleniu...@googlegroups.com
Pretty sure the gmail interface isn't using the CKEditor.  Anyway, there's really no need to access gmail via the GUI and it's much easier to access it via IMAP.

Andreas Tolfsen

未读,
2014年12月22日 04:50:482014/12/22
收件人 seleniu...@googlegroups.com
Please heed to Krishnan's advice here. There are absolutely no good
reasons you'd want to run an automation script against GMail.

pranab singh

未读,
2014年12月22日 23:54:142014/12/22
收件人 seleniu...@googlegroups.com

Check your xpath and use send keys..it works for mine..

--

Rajeev Prabhakaran Nair

未读,
2014年12月26日 02:39:462014/12/26
收件人 seleniu...@googlegroups.com
Gmail page consist of dynamic webelements, you have to use xpath / css path carefully to meet the requirements.

I have used below xpath locator to identify the body.

driver.findElement(By.xpath("//div[contains(@class,'gmail_default')]"));

its working fine for me.

R

mr. Selenide

未读,
2014年12月26日 16:19:502014/12/26
收件人 seleniu...@googlegroups.com
Hi Maciej!
Here is a working sample project for testing GMail:

You can checkout and run it locally with a few minutes.
Feel free to share your feedback.

четверг, 18 декабря 2014 г., 12:13:27 UTC+2 пользователь p.magist...@gmail.com написал:

mr. Selenide

未读,
2014年12月27日 03:07:042014/12/27
收件人 seleniu...@googlegroups.com
Good morning!

I have recorded a short video demonstrating how GMail test works:

https://vimeo.com/115448433


четверг, 18 декабря 2014 г., 12:13:27 UTC+2 пользователь p.magist...@gmail.com написал:
i want to automate gmail gui, everything is fine (i can type  the addesses in the "To" text area and

Gopi Prasadreddy

未读,
2017年5月25日 10:47:222017/5/25
收件人 Selenium Users
public static void main(String[] args) throws InterruptedException 
{
System.setProperty("webdriver.chrome.driver", "C:\\Users\\gopi\\Downloads\\chromedriver_win32\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
//System.setProperty("webdriver.Firefox.Firefoxdriver", "C:\\Users\\gopi\\Downloads\\geckodriver-v0.16.1-win64(1)");

//WebDriver driver = new FirefoxDriver();
driver.get("https://mail.google.com"); 
driver.findElement(By.id("identifierId")).sendKeys("XXXXXXX");
driver.findElement(By.xpath("/html/body/div[1]/div[1]/div[2]/div[2]/form/div[2]/div/div[2]/div[1]/content/span")).click();
Thread.sleep(4000);
 //driver.findElement(By.xpath("/html/body/div[1]/div[1]/div[2]/div[2]/form/div[2]/div/div/div[1]/div/div[1]/div/div[1]/div/div[1]/input")).sendKeys("XXXXXXXXX");
driver.findElement(By.xpath("//*[@id='password']/div[1]/div/div[1]/input")).sendKeys("XXXXXXX");
Thread.sleep(4000);
driver.findElement(By.xpath("/html/body/div[1]/div[1]/div[2]/div[2]/form/div[2]/div/div/div[2]/div[1]/content/span")).click();
Thread.sleep(20000);
//compose button
driver.findElement(By.xpath("//*[@id=':xy']/div/div")).click();
Thread.sleep(4000);
//to address
driver.findElement(By.id(":13l")).sendKeys("XXX...@gmail.com");
Thread.sleep(4000);
//subject
driver.findElement(By.id(":135")).sendKeys("TEST");
Thread.sleep(15000);
// for text
driver.findElement(By.xpath("html/body/div[14]/div/div/div/div[1]/div[3]/div[1]/div[1]/div/div/div/div[3]/div/div/div[4]/table/tbody/tr/td[2]/table/tbody/tr[1]/td/div/div[1]/div[2]/div[1]/div/table/tbody/tr/td[2]/div[2]/div")).sendKeys("this is gopiprasad sending text mail");
Thread.sleep(4000);
// file add
// driver.findElement(By.id(":14y")).click();
// driver.findElement(By.id("_hf1")).click();
 
Thread.sleep(4000);
//select file
//driver.findElement(By.xpath("desktop")).sendKeys("C:\\Users\\gopi\\Desktop\\interwiew");
//Thread.sleep(4000);
driver.findElement(By.id(":12v")).click();
Thread.sleep(10000);
driver.findElement(By.xpath("//*[@id='gb']/div[1]/div[1]/div[2]/div[4]/div[1]/a/span")).click();
Thread.sleep(4000);
driver.findElement(By.id("gb_71")).click();
Thread.sleep(4000);
回复全部
回复作者
转发
0 个新帖子