Using selenium to read gmail emails

I am using selenium-rc and I am trying to click on a specific email in gmail to get to the email page. More specifically: in a gmail inbox, click on an email with a specific question.

I cannot find the correct xpath (none of the tags in the email are links). Ideas?

+3
source share
4 answers

This XPath should do the trick:

//div[@class = 'y6']/span[contains(., 'subject_here')]

... , canvas_frame. . Firebug HTML, , . , Gmail , y6 .

, :

open http://gmail.com
// do the login stuff, click on login
waitForElementPresent canvas_frame
selectFrame canvas_frame
waitForElementPresent //div[@class = 'y6']/span[contains(., 'subject_here')]
clickAt //div[@class = 'y6']/span[contains(., 'subject_here')] 0,0
// do stuff you care about

: clickAt, Gmail , . "click".

, Gmail, . Selenium , Selenium .

+4

gmail html-.

+4

Ruby on Rails ? , - Gmail: http://github.com/bmabey/email-spec

0

clickAt | //table/tbody/tr/td[5]/div[@class='yW'] |

FROM // , .// : tr , tr [2] ..

0

Source: https://habr.com/ru/post/1722917/


All Articles