Update Scan Name

Link to Update Scan Name copied to clipboard

Supported within:
XML Compose

Scans uploaded to the dashboard automatically grab the view's title if available. You can set the name based on other criteria before pushing a scan using the setScanName on the result of uploadToDashboard method.

Updating a scan's name is only supported within automated testing.

XML Example

protected fun nameYourScanForXml() {
    rule.scenario.onActivity {
        val axeResult = axe.scan(it)?.uploadToDashboard()
        runBlocking {
            nameScan(axeResult)
        }
    }
}

private suspend fun nameScan(axeResult: AxeDevToolsResult?) {
    withContext(Dispatchers.IO) {
        axeResult?.setScanName("scanName")
    }
}

Compose Example

protected fun nameYourScanForCompose() {
    val axeResult = axeCompose.scan()?.uploadToDashboard()
    runBlocking {
        nameScan(axeResult)
    }
}

private suspend fun nameScan(axeResult: AxeDevToolsResult?) {
    withContext(Dispatchers.IO) {
        axeResult?.setScanName("scanName")
    }
}