I am not having success trying to identify and click the compose email button in google. Tried various locator techniques like Xpath, Css selector but keep getting the illlegal selector error.
Below is my current code for logging in and clicking on the compose button in Gmail,
driver.get("https://accounts.google.com/ServiceLogin?service=mail&continue=https://mail.google.com/mail/");
driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
driver.findElement(By.id("Email")).sendKeys(email);
driver.findElement(By.id("Passwd")).sendKeys(Password);
WebElement stay_signed_in = driver.findElement(By.id("PersistentCookie"));
//if(stay_signed_in.isSelected())
//stay_signed_in.click();//
driver.findElement(By.id("signIn")).click();
WebDriverWait wait = new WebDriverWait (driver, 15);
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("div[gh='cm']")));
WebElement compose_button = driver.findElement(By.xpath("div[gh='cm']"));
compose_button.click();