Cleanup in libraries and tools: use property access syntax.
This commit is contained in:
+2
-2
@@ -11,11 +11,11 @@ open class SampleTest {
|
||||
open val driver: WebDriver = HtmlUnitDriver(true)
|
||||
|
||||
@test fun homePage(): Unit {
|
||||
driver.get("file://" + File("sample.html").getCanonicalPath())
|
||||
driver.get("file://" + File("sample.html").canonicalPath)
|
||||
Thread.sleep(1000)
|
||||
|
||||
val foo = driver.findElement(By.id("foo"))!!
|
||||
val text = foo.getText() ?: ""
|
||||
val text = foo.text ?: ""
|
||||
println("Found $foo with text '$text'")
|
||||
assertEquals("x=30 y=200 z=100 u=1000", text.trim())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user