All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.wendigo.chrome.domain.accessibility.AccessibilityDomain.kt Maven / Gradle / Ivy

There is a newer version: 0.7.4
Show newest version
package pl.wendigo.chrome.domain.accessibility

/**
 * AccessibilityDomain represents remote debugger protocol domain.
 */
class AccessibilityDomain internal constructor(private val connectionRemote : pl.wendigo.chrome.DebuggerProtocol) {
    /**
     * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
     */
    fun getPartialAXTree(input : GetPartialAXTreeRequest) : io.reactivex.Single {
        return connectionRemote.runAndCaptureResponse("Accessibility.getPartialAXTree", input, GetPartialAXTreeResponse::class.java).map {
            it.value()
        }
    }

    /**
     * Returns flowable capturing all Accessibility domains events.
     */
    fun events() : io.reactivex.Flowable {
        return connectionRemote.captureAllEvents().map { it.value() }.filter {
            it.protocolDomain() == "Accessibility"
        }
    }
}
/**
 * Represents request frame that can be used with Accessibility.getPartialAXTree method call.
 *
 * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
 */
data class GetPartialAXTreeRequest (
    /**
     * ID of node to get the partial accessibility tree for.
     */
    val nodeId : pl.wendigo.chrome.domain.dom.NodeId,

    /**
     * Whether to fetch this nodes ancestors, siblings and children. Defaults to true.
     */
    val fetchRelatives : Boolean? = null

)

/**
 * Represents response frame for Accessibility.getPartialAXTree method call.
 *
 * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
 */
data class GetPartialAXTreeResponse(
  /**
   * The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
   */
  val nodes : List

)





© 2015 - 2024 Weber Informatics LLC | Privacy Policy