Skip to content

Commit 6a558da

Browse files
committed
Fix: Find window content by class name
1 parent a710828 commit 6a558da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Listary.FileAppPlugin.Files/FilesTab.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public FilesTab(IFileAppPluginHost host, AutomationElement Files)
1515
{
1616
_host = host;
1717

18-
var _windowContent = Files.FindChildAt(2);
18+
// Find window content to reduce the scope
19+
var _windowContent = Files.FindFirstChild(cf => cf.ByClassName("Microsoft.UI.Content.DesktopChildSiteBridge"));
1920

2021
_currentPathGet = _windowContent.FindFirstChild(cf => cf.ByAutomationId("CurrentPathGet"))?.AsTextBox();
2122
if (_currentPathGet == null)

0 commit comments

Comments
 (0)