From 406a0fdbf881cb754315838b8fa34a7e0d0bc602 Mon Sep 17 00:00:00 2001 From: "eugene.nizienko" Date: Thu, 2 Nov 2023 18:03:01 +0100 Subject: [PATCH] added hasFocus attribute --- .../remoterobot/services/xpath/XpathDataModelCreator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/robot-server-core/src/main/kotlin/com/intellij/remoterobot/services/xpath/XpathDataModelCreator.kt b/robot-server-core/src/main/kotlin/com/intellij/remoterobot/services/xpath/XpathDataModelCreator.kt index 7d42d8e9..f16ca65a 100644 --- a/robot-server-core/src/main/kotlin/com/intellij/remoterobot/services/xpath/XpathDataModelCreator.kt +++ b/robot-server-core/src/main/kotlin/com/intellij/remoterobot/services/xpath/XpathDataModelCreator.kt @@ -8,7 +8,6 @@ import org.assertj.swing.edt.GuiActionRunner import org.assertj.swing.edt.GuiTask import org.assertj.swing.hierarchy.ComponentHierarchy import org.assertj.swing.hierarchy.ExistingHierarchy -import org.intellij.lang.annotations.Language import org.w3c.dom.Document import org.w3c.dom.Element import java.awt.Component @@ -77,6 +76,8 @@ class XpathDataModelCreator(private val textToKeyCache: TextToKeyCache) { element.setAttribute("robot_target_element", "true") } + element.setAttribute("hasfocus", hasFocus().toString()) + val elementText = StringBuilder().apply { append(jClass).append(". ") } val allFields = mutableSetOf()