title: Unable to click on Setting Icon in Gmail with selenium web-driver
body: <p>This is what i am trying do on Gmail.</p>
  
  <ol>
  <li>www.gmail.com</li>
  <li>Login using a valid user (if does not exist create a dummy user)</li>
  <li>Click on Inbox</li>
  <li>Click on first email</li>
  <li>Click on Compose Email.</li>
  <li>Send the mail to the same email account.</li>
  <li>Click on options icon on the top right corner</li>
  <li>Got to vacation responder on the General settings tab</li>
  <li>Select vacation responder to on.</li>
  </ol>
  
  <p>I am able to click on 1st email and pick the email Address and then click on compose email button, also able to send the email.
  The problem i am facing is unable to click on settings icon. The element is hidden, i am not able to click it. I tried it with customized-Xpath and also tried to click it with coordinates.
  But it not working for me. Please can anyone help me on this.</p>
  
  <pre><code>import org.openqa.selenium.By;
  import org.openqa.selenium.Point;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.firefox.FirefoxDriver;
  import org.openqa.selenium.interactions.Actions;
  import org.openqa.selenium.support.ui.ExpectedConditions;
  import org.openqa.selenium.support.ui.WebDriverWait;
  
  
      public class Gmail1 {   
  
  public static void main(String[] args) throws InterruptedException {
  
              // Login to browser
              WebDriver driver= new FirefoxDriver();
              driver.get("https://www.gmail.com");
              driver.manage().window().maximize();
              System.out.println("Browser opned");
              driver.findElement(By.xpath("//*[@id='Email']")).sendKeys("Use your UserId");
              System.out.println("Entered Email id");
              driver.findElement(By.xpath("//*[@id='next']")).click();
              System.out.println("Clicked on Next");
                 Thread.sleep(3000);
              driver.findElement(By.xpath("//*[@id='Passwd']")).sendKeys("Use your password");
              System.out.println("Entered the Password");
              driver.findElement(By.xpath("//*[@id='signIn']")).click();
              System.out.println("Welcome to gmail");
                 Thread.sleep(5000);
              driver.findElement(By.xpath("//*[@id=':3d']")).click();
              System.out.println("Clicked on email");
                 Thread.sleep(3000);
              String emailid = driver.findElement(By.xpath("//span[@class='go']")).getText();
              emailid=emailid.substring(emailid.indexOf("&lt;")+1, emailid.indexOf("&gt;"));
              System.out.println(emailid);
              driver.findElement(By.xpath("//*[@id=':it']/div/div")).click();
              System.out.println("Clicked on Compose mail");
              driver.findElement(By.xpath("//*[@name='to']")).sendKeys(emailid);
              System.out.println("Entered the TO Email Address");
              driver.findElement(By.xpath("//*[@name='subjectbox']")).sendKeys("My Mail");
              System.out.println("Entered Subject of the email");
              driver.findElement(By.xpath("//*[@role='button' and .='Send']")).click();
              System.out.println("Clicked on send button");
  
              clickSetting(driver);    
          }
      public static void clickSetting(WebDriver driver){
              //Tried with Coordinates (doesn't work)
              Point point = driver.findElement(By.xpath("//div[@class='G-Ni J-J5-Ji'] [@gh ='s']/*[1]")).getLocation();
              System.out.println(point.x + "-" + point.y);
              Actions builder = new Actions(driver);  
              builder.moveByOffset(point.x, point.y).click().build().perform(); //Getting Error.
  
              //Tried with Action Class (doesn't work)
              WebDriverWait wait = new WebDriverWait(driver, 10);
              WebElement SettingWheel=driver.findElement(By.xpath("//*[@data-tooltip='Settings' and @role='button']"));
              WebElement SettingsLink=driver.findElement(By.xpath("//*[@role='menuitem']/div[.='Settings']"));
              wait.until(ExpectedConditions.elementToBeClickable(SettingWheel));
              Actions  actions  = new Actions(driver);
              actions.moveToElement(SettingWheel).moveToElement(SettingsLink).click().build().perform();//Getting Error.
              Thread.sleep(2000);
              System.out.println("Clicked On Setting");           
          }
  </code></pre>
  
  <p><em>Error message</em>:- "Element is not currently visible and so may not be interacted with (WARNING: The server did not provide any stacktrace information)"</p>
  
  <p>Thanks in Advance.</p>