回复 14# 小白龙
将$dontSaveButton = $modalWindows[0].FindFirstDescendant("SecondaryButton").AsButton()COPY 和$dontSaveButton = $modalWindows[0].FindFirstDescendant( { param($cf) $cf.ByAutomationId("CommandButton_7")} ).AsButton()COPY 换成$dontSaveButton=[FlaUI.Core.AutomationElements.AutomationElementExtensions]::AsButton($modalWindows[0].FindFirstDescendant("SecondaryButton"))COPY
$dontSaveButton=[FlaUI.Core.AutomationElements.AutomationElementExtensions]::AsButton($modalWindows[0].FindFirstDescendant( { param($cf) $cf.ByAutomationId("CommandButton_7")} ))COPY
|