use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class XMLSerializerTest method htmlAttributes.
/**
* @throws Exception if the test fails
*/
@Test
@Alerts(DEFAULT = "no ActiveX", IE = {})
@NotYetImplemented(IE)
public // so far we are not able to add the XML header
void htmlAttributes() throws Exception {
final String expectedString = getExpectedAlerts().length != 0 ? "" : "<?xml32version=\"1.0\"?>\\r\\n<html32xmlns=\"http://www.w3.org/1999/xhtml\">" + "<head><title>html</title></head>" + "<body32id=\"bodyId\">" + "<span32class=\"spanClass\">foo</span>" + "</body>" + "</html>\\r\\n";
final String serializationText = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + "<html xmlns=\"http://www.w3.org/1999/xhtml\">" + "<head><title>html</title></head>" + "<body id=\"bodyId\">" + "<span class=\"spanClass\">foo</span>" + "</body>" + "</html>";
final WebDriver driver = loadPageVerifyTitle2(constructPageContent(serializationText));
final WebElement textArea = driver.findElement(By.id("myTextArea"));
assertEquals(expectedString, textArea.getAttribute("value"));
}
use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class XMLDOMDocumentTest method lastChild_xmlDeclaration.
/**
* @throws Exception if the test fails
*/
@Test
@Alerts(DEFAULT = "no ActiveX", IE = "xml(7)=version=\"1.0\"")
@NotYetImplemented(IE)
public // Xerces does not offer any way to access the XML declaration
void lastChild_xmlDeclaration() throws Exception {
final String xml = "" + "<foo>\n" + " <foofoo name='first'>something</foofoo>\n" + " <foofoo name='second'>something else</foofoo>\n" + "</foo>" + "<?xml version=\"1.0\"?>\n";
tester("debug(doc.lastChild);\n", xml);
}
use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class XMLDOMDocumentTest method firstChild_xmlDeclaration.
/**
* @throws Exception if the test fails
*/
@Test
@Alerts(DEFAULT = "no ActiveX", IE = "xml(7)=version=\"1.0\"")
@NotYetImplemented(IE)
public // Xerces does not offer any way to access the XML declaration
void firstChild_xmlDeclaration() throws Exception {
final String xml = "" + "<?xml version=\"1.0\"?>\n" + "<foo>\n" + " <foofoo name='first'>something</foofoo>\n" + " <foofoo name='second'>something else</foofoo>\n" + "</foo>";
tester("debug(doc.firstChild);\n", xml);
}
use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class HtmlFrame2Test method frameOnloadFrameInFrame.
/**
* @throws Exception if an error occurs
*/
@Test
@Alerts("second fourth third first")
@NotYetImplemented
public void frameOnloadFrameInFrame() throws Exception {
final String html = "<FRAMESET rows='50%,50%' onload=\"document.title += ' first'\">\n" + " <FRAME name='second' src='second.html'>\n" + " <FRAME name='third' src='third.html'>\n" + "</FRAMESET>";
final String secondHtml = "<html>\n" + "<body onload=\"top.document.title += ' second'\">\n" + " <h1>second</h1>\n" + "</body></html>";
final String thirdHtml = "<FRAMESET cols='100%' onload=\"top.document.title += ' third'\">\n" + " <FRAME name='fourth' src='fourth.html'>\n" + "</FRAMESET>";
final String fourthHtml = "<html>\n" + "<body onload=\"top.document.title += ' fourth'\">\n" + " <h1>fourth</h1>\n" + "</body></html>";
getMockWebConnection().setResponse(new URL(URL_FIRST, "second.html"), secondHtml);
getMockWebConnection().setResponse(new URL(URL_FIRST, "third.html"), thirdHtml);
getMockWebConnection().setResponse(new URL(URL_FIRST, "fourth.html"), fourthHtml);
final WebDriver driver = loadPage2(html);
assertEquals(4, getMockWebConnection().getRequestCount());
assertTitle(driver, getExpectedAlerts()[0]);
}
use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class HtmlElement2Test method contentEditable.
/**
* @throws Exception if the test fails
*/
@Test
@NotYetImplemented
public // this could be a general attribute issue
void contentEditable() throws Exception {
final String html = "<html>\n" + "<body contentEditable><p>initial</p></body>\n" + "</html>";
final WebDriver driver = loadPage2(html);
final WebElement body = driver.findElement(By.xpath("//body"));
body.clear();
body.sendKeys("something");
assertEquals("something", body.getText());
}
Aggregations