use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class MooTools121Test method mooTools.
/**
* @throws Exception if an error occurs
*/
@Alerts(DEFAULT = { "364", "1", "0", "should return the function bound to an object with multiple arguments" }, IE = { "364", "2", "0", "should return the function bound to an object with multiple arguments", "should return a CSS string representing the Element's styles" })
@Test
@NotYetImplemented(IE)
public void mooTools() throws Exception {
final WebDriver driver = getWebDriver();
driver.get(URL_FIRST + "Specs/index.html");
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.findElement(By.xpath("id('progress')[text() = '100']"));
// usually this need 40s but sometimes our build machine is slower
// this is not a performance test, we only like to ensure that all
// functionality is running
final List<WebElement> failed = driver.findElements(By.xpath("//li[@class = 'exception']/h4"));
final List<String> failures = new ArrayList<>();
for (final WebElement elt : failed) {
failures.add(elt.getText());
}
// final File tmpFile = File.createTempFile("htmlunit", "mootools.html");
// System.out.println(tmpFile.getAbsolutePath());
// FileUtils.writeStringToFile(tmpFile, driver.getPageSource());
assertEquals(Arrays.copyOfRange(getExpectedAlerts(), 3, getExpectedAlerts().length), failures);
assertEquals(getExpectedAlerts()[0], driver.findElement(By.id("total_examples")).getText());
assertEquals(getExpectedAlerts()[1], driver.findElement(By.id("total_failures")).getText());
assertEquals(getExpectedAlerts()[2], driver.findElement(By.id("total_errors")).getText());
}
Aggregations