user3029936
user3029936

Reputation: 11

How do you go through an email inbox with SeleniumLibrary in Robot Framework?

Specifically, I want to use SeleniumLibrary to accept a confirmation email. The account I am accessing is a Gmail account. I already automated the log in without a problem, but I cannot find the correct name, nor id, in the HTML source code of the Gmail inbox to which to set the locator. I'm just trying to access an email automatically.

Upvotes: 0

Views: 2326

Answers (2)

Dmitriy Zverev
Dmitriy Zverev

Reputation: 369

May be easier to use the robotframework-imaplibrary

Upvotes: 1

Nathan Merrill
Nathan Merrill

Reputation: 8396

There are two ways to do this:

First is to get a List<WebElement> found by By.cssSelector(".zA"), and iterate through them until you find the one that contains the text you want.

I don't like that solution, partially because .zA is minimized CSS (and therefore, may change), and is not descriptive.

I think the best solution is to use IMAP, as Stefan has described. It is also much faster than Selenium.

Upvotes: 0

Related Questions