*Summary
I believe I have found a bug in the Native Windows Recorder. Katalon Studio cannot find some objects during test execution, despite obtaining these objects from the Windows Recorder. The same bug might exist in the regular Windows Action Recorder, but I cannot currently confirm this because the Windows Action Recorder is not displaying the application’s screen in the Screen View. The Windows spy tool is also not functioning on my computer. I am still troubleshooting the issues with Windows Action Recorder and Windows spy tool.
*Steps to reproduce
Katalon cannot find some objects during test execution, despite obtaining these objects from the Windows Recorder.
I originally thought this was a result of the Custom nodes in the xpaths and created a script to navigate through the DOM tree. After navigating the tree a bit, I found that Katalon could find the Custom nodes just fine. The issue seems to come from the /Datagrid[1]/Dataitem[#]/Cell[#] portion of the xpath. After cross-referencing the xpath with Accessibility Insights for Windows, I found that the nodes do not line up with ControlTypes listed in Accessibility Insights. The nodes are listed as DataGrid, DataItem, and Custom respectively.
When I modified the xpath to match the ControlTypes listed in Accessibility Insights, Katalon Studio was then able to find the object during test execution.
I believe this is a bug in the recorder. I’ve been looking through the release notes, documentation, and forums and have not yet found any references to this sort of problem with the recorder (Windows recorders specifically). Is this a bug? Or is it a known issue or something that can be fixed by tweaking some settings in Katalon Studio?
*Blocker?
This is not currently a blocker, but I do need to go back and manually fix some auto-generated xpaths.
We investigated this and it appears to be a Native Windows Recorder bug in KS 10.4.3 rather than a configuration issue.
The recorder is generating some XPath tags that do not match the actual runtime control tags exposed during execution. In the reproduced case, the recorded XPath used values like Datagrid / Dataitem, while the runtime tree exposed DataGrid / DataItem. After correcting the XPath to match the runtime control tags, Katalon Studio was able to find the object successfully.
As a workaround, the affected recorded objects can be updated manually to use the corrected XPath or a more stable locator such as Accessibility ID, Name, or Class Name when available.
the workaround is to manually correct the auto-generated XPaths to match the actual control tags exposed in the runtime tree. You can use Accessibility Insights for Windows to verify the correct ControlType names. Alternatively, switch the locator strategy on the affected test objects to use Accessibility ID, Name, or Class Name instead of XPath, which tends to be more resilient against these tree structure inconsistencies