Skip to content

Commit

Permalink
Fix win10, hopefully for the last time
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkatz6 committed Jun 28, 2024
1 parent 0ba5c62 commit 32ec719
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 0 additions & 4 deletions azure-pipelines-integrationtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,3 @@ jobs:
inputs:
OperationType: 'Stop'
displayName: 'Stop WinAppDriver'

- publish: 'tests/Avalonia.IntegrationTests.Appium/bin/Debug/net8.0/rootSource.xml'
displayName: 'Publish appium logs on failure'
condition: always()
5 changes: 1 addition & 4 deletions tests/Avalonia.IntegrationTests.Appium/TrayIconTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,10 @@ public void Can_Toggle_TrayIcon_Visibility()
?? throw new InvalidOperationException("SystemTrayIcon cannot be found.");
trayIconsButton.Click();

var rootSource = session.PageSource;
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, "rootSource.xml"), rootSource);

// win11: TopLevelWindowForOverflowXamlIsland
// win10: NotifyIconOverflowWindow
var trayIconsFlyout = session.FindElementsByClassName("TopLevelWindowForOverflowXamlIsland").FirstOrDefault()
?? taskBar.FindElementsByClassName("NotifyIconOverflowWindow").FirstOrDefault()
?? session.FindElementsByClassName("NotifyIconOverflowWindow").FirstOrDefault()
?? throw new InvalidOperationException("System tray overflow window cannot be found.");
return TryToGetIcon(trayIconsFlyout, trayIconName);
}
Expand Down

0 comments on commit 32ec719

Please sign in to comment.