Я тестирую приложение с селеном ide и rc.Мне нужно проверить ссылки.
Обычно я экспортирую файл из Selenium ide в junit 4 и запускаю файл в eclipse.Файл выглядит следующим образом
пакет com.example.tests;
import com.thoughtworks.selenium. *;импорт org.junit.After;импорт org.junit.Before;import org.junit.Test;import java.util.regex.Pattern;
расширяет открытый класс* -w2003.hi.inet / CustomerSupport ");selenium.start ();}
@Test
public void testLogin_csupport() throws Exception {
selenium.open("http://daisy-w2003.hi.inet/CustomerSupport/?ReturnUrl=%2fCustomerSupport%2fAccount");
assertEquals("Calling Cards Customer Support - Inicio", selenium.getTitle());
selenium.type("UserName", "admin");
selenium.type("Password", "admin");
selenium.click("//div[@id='content']/div/form/div[3]/a/span[2]");
selenium.waitForPageToLoad("30000");
assertEquals("Calling Cards Customer Support - Gestión", selenium.getTitle());
}
@After
public void tearDown() throws Exception {
selenium.stop();
}
} Использование getAllLinks Я хотел бы проверить ссылки на странице.Пожалуйста, кто-нибудь может мне помочь ??
Спасибо