Clicking logout button in Gmail using Selenium WebDriver (By using cssSelector)

In gmail account i need to click on ‘logout’  but its not able to identify this element
using these commands but not working
WebElement logout=driver.findElement(By.cssSelector(“span.gb_4.gbii”));
logout.click();
WebElement signout=driver.findElement(By.id(“gb_71”));
signout.click();
Add Comment
  • 1 Answer(s)

    Try using action class.

    Default Answered on March 25, 2017.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.