@@ -0,0 +1,2787 @@
+package ru.selenium;%0A%0Aimport org.openqa.selenium.By;%0Aimport org.openqa.selenium.Keys;%0Aimport org.openqa.selenium.WebElement;%0Aimport org.openqa.selenium.support.ui.ExpectedConditions;%0Aimport org.openqa.selenium.support.ui.WebDriverWait;%0Aimport org.testng.Assert;%0Aimport org.testng.annotations.BeforeSuite;%0Aimport org.testng.annotations.Test;%0A%0Aimport java.util.List;%0Aimport java.util.concurrent.TimeUnit;%0A%0A/**%0A * Created by Maria on 20.07.2016.%0A */%0Apublic class SearchFilm extends TestNgTestBase %7B%0A    private WebDriverWait wait;%0A    private String filmIwant;%0A%0A    @BeforeSuite%0A    public void login() %7B%0A        driver.get(baseUrl + %22/php4dvd/%22);%0A        driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);%0A        wait = new WebDriverWait(driver, 10);%0A        wait.until(ExpectedConditions.presenceOfElementLocated(By.id(%22username%22)));%0A        driver.findElement(By.id(%22username%22)).clear();%0A        driver.findElement(By.id(%22username%22)).sendKeys(%22admin%22);%0A        driver.findElement(By.name(%22password%22)).clear();%0A        driver.findElement(By.name(%22password%22)).sendKeys(%22admin%22);%0A        driver.findElement(By.name(%22submit%22)).click();%0A    %7D%0A%0A    @Test // %D1%84%D0%B8%D0%BB%D1%8C%D0%BC %D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%0A    public void testFoundFilm() throws Exception %7B%0A        List%3CWebElement%3E films = wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.className(%22movie_box%22)));%0A%0A        WebElement searchField = wait.until(ExpectedConditions.presenceOfElementLocated(By.id(%22q%22)));%0A        searchField.clear();%0A        filmIwant = %22Ice Age%22;%0A        searchField.sendKeys(filmIwant + Keys.RETURN);%0A%0A        Boolean rsltsInvsbl = wait.until(ExpectedConditions.invisibilityOfAllElements(films));%0A        Assert.assertTrue(rsltsInvsbl);%0A%0A        List%3CWebElement%3E searchResult = wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.className(%22movie_box%22)));%0A        for (WebElement webElement : searchResult) %7B%0A            Assert.assertTrue(filmIwant.equals(webElement.findElement(By.className(%22title%22)).getText()));%0A        %7D%0A    %7D%0A%0A    @Test // %D1%84%D0%B8%D0%BB%D1%8C%D0%BC %D0%BD%D0%B5 %D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%0A    public void testNotFoundFilm()%7B%0A        List%3CWebElement%3E films = wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.className(%22movie_box%22)));%0A%0A        WebElement searchField = wait.until(ExpectedConditions.presenceOfElementLocated(By.id(%22q%22)));%0A        searchField.clear();%0A        filmIwant = %22klflvk%22;%0A        searchField.sendKeys(filmIwant + Keys.RETURN);%0A%0A        Boolean rsltsInvsbl = wait.until(ExpectedConditions.invisibilityOfAllElements(films));%0A        Assert.assertTrue(rsltsInvsbl);%0A%0A        WebElement notFound = wait.until(ExpectedConditions.presenceOfElementLocated(By.className(%22content%22)));%0A        String title = notFound.getText();%0A%0A        Assert.assertTrue(title.equals(%22No movies where found.%22));%0A    %7D%0A%7D%0A

Add tests FılmFound and FılmNotFound