Reputation: 11
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
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