package com.example.tests;
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.util.regex.Pattern;
public class VK_03 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 testVK_03() throws Exception {
selenium.open("/?target=search&event=hotel®ion_id=1222&city=%D0%9A%D0%B8%D0%B5%D0%B2&unknown_dates=on&max_persons=2");
selenium.selectFrame("fXDc46b2");
selenium.click("link=Путешествуй по Украине! Hotels24.ua");
}
@After
public void tearDown() throws Exception {
selenium.stop();
}
}
Задача: зайти на сайт и кликнуть по ссылке. Результат - открытие страницы. Проблема в том что программа не может найти ссылку и завершается с ошибкой на строке selenium.selectFrame("fXDc46b2"); а если ее закоментить то на строке selenium.click("link=Путешествуй по Украине! Hotels24.ua"); пишет - "not found"
Подскажите, пожалуйста, в чем может быть проблема.

