Razvan
@Test fun index() { val app = routes( "/hello" bind Method.GET to { Response(OK).body("<html><title>hello</title></html>") } ) val driver = Http4kWebDriver(app) driver.navigate().to("<http://localhost:10000/hello>") println(driver.title) println(driver.currentUrl) println(driver.findElement(By.tagName("title"))) }
<http://localhost:10000/>\hello null
hello <http://localhost:10000/hello> JSoupWebElement(navigate=fun org.http4k.webdriver.Http4kWebDriver.navigateTo(org.http4k.core.Request): kotlin.Unit, getURL=() -> kotlin.String?, element=<title>hello</title>)
dave
Http4kWebDriver.normalized()
Path.get("/hello") returns "\hello"
A modern programming language that makes developers happier.