1. Зайти на страницу
2. Нажать на кнопку "Заказать обратный звонок"
3. Нажать на кнопку "Отправить заказ"
В результате должно появится окно с ошибкой "Вы ввели неверный номер телефона"
Вот код даного теста:
package HP;
import com.thoughtworks.selenium.Selenium;
import com.thoughtworks.selenium.SeleneseTestCase;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverBackedSelenium;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.regex.Pattern;
public class _58_09_07 extends SeleneseTestCase {
@Before
public void setUp() throws Exception {
WebDriver driver = new FirefoxDriver();
String baseUrl = "http://hotels24.ua/";
selenium = new WebDriverBackedSelenium(driver, baseUrl);
}
@Test
public void test_58_09() throws Exception {
selenium.open("/%D0%B3%D0%BE%D1%81%D1%82%D0%B8%D0%BD%D0%B8%D1%86%D1%8B/%D0%9A%D0%B8%D0%B5%D0%B2%D0%B0/hotels-%D0%B3%D0%BE%D1%81%D1%82%D0%B8%D0%BD%D0%B8%D1%86%D0%B0-BB-347.html");
selenium.click("id=contacts");
selenium.click("css=#fast_book_button_contacts > span");
selenium.click("id=fast_book_submit");
assertEquals("Вы ввели неверный номер телефона", selenium.getAlert());
}
@After
public void tearDown() throws Exception {
selenium.stop();
}
}
Проблема в том что на последней строчке появляется ошибка There were no alerts Подскажите плиз как это можно исправить.

