Can't access element in KotlinJS unit test

Hello. I made a new project using Kotlin Multiplatform. I am trying to write a unit test in JS from the “Hello from Ktor” example. The goal is to assert I have the right class by asserting the “root” div exists. When I getElementById as HTMLDivElement or HTMLElement, I get an illegal cast error. When I don’t cast anything, I get null for those elements. I tried document and window.document. What am I doing wrong? Thank you in advance for any help.

import react.dom.render
import kotlinx.browser.document
import kotlinx.browser.window
import kotlinx.html.HTML
import kotlinx.html.id
import org.w3c.dom.HTMLDivElement
import org.w3c.dom.HTMLElement
import react.isValidElement
import kotlin.test.*

class clientTests {
// am I loading the right class?

@Test
fun checkRightClassIsLoaded() {
    var element = document.getElementById("root") 
    if (element != null) {
        println(element.id)
    } else {
        println("*****************why")
    }

// assertEquals(2, 1+1)
}

}

I was able to get to the point where I could get a document.documentElement which looks like it’s giving me a test report instead of the web page I wanted to look at. How do I get to the actual web page under test?