use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class HtmlAnchorTest method doubleClick.
/**
* FF behaves is different.
* @throws Exception if an error occurs
*/
@Test
@Alerts(DEFAULT = "click href click doubleClick href ", IE = "click href click doubleClick ")
@BuggyWebDriver(FF = "click doubleClick click href href ", FF_ESR = "click doubleClick click href href ")
@NotYetImplemented
public void doubleClick() throws Exception {
final String html = "<html>\n" + "<body>\n" + " <a id='myAnchor' " + "href=\"javascript:document.getElementById('myTextarea').value+='href ';void(0);\" " + "onClick=\"document.getElementById('myTextarea').value+='click ';\" " + "onDblClick=\"document.getElementById('myTextarea').value+='doubleClick ';\">foo</a>\n" + " <textarea id='myTextarea'></textarea>\n" + "</body></html>";
final WebDriver driver = loadPage2(html);
final Actions action = new Actions(driver);
action.doubleClick(driver.findElement(By.id("myAnchor")));
action.perform();
assertEquals(getExpectedAlerts()[0], driver.findElement(By.id("myTextarea")).getAttribute("value"));
}
use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class HtmlTimeInputTest method typing.
/**
* @throws Exception if the test fails
*/
@Test
@Alerts(DEFAULT = "", IE = "8:04")
@NotYetImplemented(IE)
public void typing() throws Exception {
final String htmlContent = "<html><head><title>foo</title></head><body>\n" + "<form id='form1'>\n" + " <input type='time' id='foo'>\n" + "</form></body></html>";
final WebDriver driver = loadPage2(htmlContent);
final WebElement input = driver.findElement(By.id("foo"));
input.sendKeys("8:04");
assertEquals(getExpectedAlerts()[0], input.getAttribute("value"));
}
use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class HtmlTextArea2Test method getVisibleTextValueChangedWithTyping.
/**
* @throws Exception if the test fails
*/
@Test
@Alerts(DEFAULT = "Hello World", IE = "Hello WorldHtmlUnit")
@NotYetImplemented(IE)
public void getVisibleTextValueChangedWithTyping() throws Exception {
final String html = "<html>" + "<head></head>\n" + "<body>\n" + "<form id='form1'>\n" + "<textarea id='tester'>Hello World</textarea>\n" + "</form>\n" + "</body></html>";
final WebDriver driver = loadPage2(html);
final WebElement textArea = driver.findElement(By.id("tester"));
textArea.sendKeys("HtmlUnit");
final String text = textArea.getText();
assertEquals(getExpectedAlerts()[0], text);
if (driver instanceof HtmlUnitDriver) {
final HtmlPage page = (HtmlPage) getWebWindowOf((HtmlUnitDriver) driver).getEnclosedPage();
assertEquals(getExpectedAlerts()[0], page.getElementById("tester").getVisibleText());
}
}
use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class HtmlWeekInputTest method typing.
/**
* @throws Exception if the test fails
*/
@Test
@Alerts(DEFAULT = "36", CHROME = "", EDGE = "")
@NotYetImplemented({ FF, FF_ESR, IE })
public void typing() throws Exception {
final String htmlContent = "<html><head><title>foo</title></head><body>\n" + "<form id='form1'>\n" + " <input type='week' id='foo'>\n" + "</form></body></html>";
final WebDriver driver = loadPage2(htmlContent);
final WebElement input = driver.findElement(By.id("foo"));
input.sendKeys("36");
assertEquals(getExpectedAlerts()[0], input.getAttribute("value"));
}
use of com.gargoylesoftware.htmlunit.junit.BrowserRunner.NotYetImplemented in project htmlunit by HtmlUnit.
the class HttpWebConnection3Test method queryString.
/**
* Test case for Bug #1882.
*
* @throws Exception if the test fails
*/
@Test
@NotYetImplemented
public void queryString() throws Exception {
final String response = "HTTP/1.1 302 Found\r\n" + "Content-Length: 0\r\n" + "\r\n";
shutDownAll();
try (PrimitiveWebServer primitiveWebServer = new PrimitiveWebServer(null, response, null)) {
final WebDriver driver = getWebDriver();
driver.get("http://localhost:" + primitiveWebServer.getPort() + "?para=%u65E5");
assertTrue(primitiveWebServer.getRequests().get(0), primitiveWebServer.getRequests().get(0).contains("para=%u65E5"));
}
}
Aggregations