0
driver.findElement(By.xpath("//*[@id=\"io-ox-login-username\"]")).sendKeys("leads@xyz.com");
        driver.findElement(By.xpath("//*[@id=\"io-ox-login-password\"]")).sendKeys("abc2123");

        driver.findElement(By.xpath("//*[@id=\"io-ox-login-button\"]")).click();
        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);        
        driver.findElement(By.xpath("//div[@class='folder-label']//div[contains(text(),'Inbox')]")).click();

    List<WebElement> a = driver.findElements(By.xpath("//*[@id='io.ox/mail']"));
        System.out.println(a.size());
Sven Eberth
  • 3,057
  • 12
  • 24
  • 29

1 Answers1

0

Try using getAttribute("value");

assuming "//*[@id='io.ox/mail']" is your inbox..

driver.findElements(By.xpath("//*[@id='io.ox/mail']").getAttribute("value"); 

should work, if not change the By element for the right one.

Sven Eberth
  • 3,057
  • 12
  • 24
  • 29