I am a learner. I am trying to automate the logout functionality of Gmail using Selenium Webdriver but unable to do so ..
There are two Phases in logout, first click the Right Link at the top, if that box appears then click logout. iam unable to do so.
<span id="gbi4t" style="max-width: 76px; text-align: left;">Mahmood Ali</span>
<a id="gb_71" class="gbqfbb" href="?logout&hl=en&hlor" onclick="gbar.logger.il(9,{l:'o'})" role="button" target="_top">Sign out</a>
here is my xpath
//*[@id="gbi4t"] -> Clicking that top to get the logout pop up
//*[@id="gb_71"] -> To logout the gmail application
i have tried such as
driver.findElement(By.id("gbi4t")).click(); OR
driver.findElement(By.xpath("//*[@id='gbi4t']")).click();
driver.findElement(By.id("gb_71")).click(); OR
driver.findElement(By.xpath("//*[@id='gb_71']")).click();
Some ideas out there ?