@Test
public void testNote() throws Exception {
driver.get(baseUrl + "/");
driver.findElement(By.linkText("Вход")).click();
driver.findElement(By.id("field_loginemail")).clear();
driver.findElement(By.id("field_loginemail")).sendKeys("testa13@ukr.net");
driver.findElement(By.id("field_loginpassword")).click();
driver.findElement(By.id("field_loginpassword")).clear();
driver.findElement(By.id("field_loginpassword")).sendKeys("testa13");
driver.findElement(By.xpath("//*[@id='popupLogin']/div/div/div[4]/a")).click();
driver.findElement(By.cssSelector("span.header-add-material-span")).click();
driver.findElement(By.xpath(".//*[@id='add_material']/div/div[2]/table/tbody/tr[1]/td[3]/a/span")).click();
driver.findElement(By.id("field_notename")).clear();
driver.findElement(By.id("field_notename")).sendKeys("test");
driver.findElement(By.xpath(".//*[@id='form_notePhoto']/div/span[1]/input")).click();
driver.findElement(By.name("fileToUpload")).sendKeys("D:\\123\\love.png");
Thread.sleep(6000);
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.xpath("//iframe")));
driver.findElement(By.xpath("//body")).clear();
driver.findElement(By.xpath("//body")).sendKeys("Текст заметочкииии");
driver.switchTo().defaultContent();
driver.findElement(By.xpath(".//*[@id='add_geo_note_edit']/a/span")).click();
driver.findElement(By.xpath("//div[@id='pp-reg-city']/div/div/table/tbody/tr[2]/td[2]/div/p[2]")).click();
driver.findElement(By.xpath(".//*[@id='pp-reg-city']/div/div/table/tbody/tr[2]/td[4]/div/p[1]")).click();
driver.findElement(By.id("note_edit-locationResortPlaceSubmit")).click();
driver.findElement(By.id("btn-show-category-note_edit")).click();
driver.findElement(By.id("tn-category-note_edit-1")).click();
driver.findElement(By.id("tn-category-note_edit-5")).click();
driver.findElement(By.id("tn-category-note_edit-6")).click();
driver.findElement(By.cssSelector("#type-category-note_edit > div.content > div.submit > a.choose")).click();
driver.findElement(By.id("note_publish")).click();
}
Вот :)