I'm trying to do a little gmail automation. What my code does is compose an email and then I'm trying to select the textareas (subject, body, recipients) using the IDs that I copied from the HTML source. These IDs work while I'm getting to the gmail page but stop working when I try to access the textareas.
System.out.println(driver.getTitle());
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(":3tx")));
sign = driver.findElement(By.id(":3tx"));
sign.sendKeys(recipient);
Then I get this error:
Exception in thread "main" org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.id: :3tx (tried for 5 second(s) with 500 MILLISECONDS interval)
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:232)
at Email.sendEmail(Email.java:42)
at Email.main(Email.java:60)
Caused by: org.openqa.selenium.NoSuchElementException: Cannot locate an element using By.id: :3tx
https://i.stack.imgur.com/u02cU.jpg <= Where I'm pulling the ID value from