fun doAction()

in robot-server-core/src/main/kotlin/com/intellij/remoterobot/services/IdeRobot.kt [308:321]


    fun doAction(componentId: String, script: String, runInEdt: Boolean): Result<Unit> {
        val componentContext = componentContextCache[componentId]
            ?: throw IllegalStateException("Unknown component id $componentId")
        return getResult(componentContext) { ctx ->
            if (runInEdt) {
                runInEdtWithWIL {
                    jsExecutor.execute(script, ctx)
                }
            } else {
                jsExecutor.execute(script, ctx)
            }
            Unit
        }
    }