Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.ArgumentException: Error in FindFirstDescendant #60

Open
ThomasPoucher opened this issue Jun 28, 2022 · 0 comments
Open

System.ArgumentException: Error in FindFirstDescendant #60

ThomasPoucher opened this issue Jun 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ThomasPoucher
Copy link
Collaborator

Describe the bug
Received this error on a FindFirstDescendant operation swapping windows. Find operation was x => x.ByHelpText(helpTextGuid).And(x.ByControlType(ControlType.Window)

System.ArgumentException with message "Value does not fall within the expected range."
at Interop.UIAutomationClient.CUIAutomation8Class.CreatePropertyConditionEx(Int32 propertyId, Object value, PropertyConditionFlags flags)
at SHAutomation.UIA3.Converters.ConditionConverter.ToNative(UIA3Automation automation, ConditionBase condition)
at SHAutomation.UIA3.Converters.ConditionConverter.<>c__DisplayClass0_0.b__0(ConditionBase c)
at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at SHAutomation.UIA3.Converters.ConditionConverter.ToNative(UIA3Automation automation, ConditionBase condition)
at SHAutomation.UIA3.UIA3FrameworkAutomationElement.FindFirst(TreeScope treeScope, ConditionBase condition)
at SHAutomation.Core.AutomationElements.SHAutomationElement.FindFirstBase(TreeScope treeScope, ConditionBase condition)
at SHAutomation.Core.AutomationElements.SHAutomationElement.FindFirstDescendantBase(ConditionBase condition)
at SHAutomation.Core.AutomationElements.SHAutomationElement.<>c__DisplayClass204_0.b__0()
at SHAutomation.Core.AutomationElements.SHAutomationElement.GetElement(Func1 function, Boolean shouldExist, ISHAutomationElement& element) at SHAutomation.Core.AutomationElements.SHAutomationElement.FindFirstDescendant(ConditionBase condition, TimeSpan timeout, Boolean waitUntilExists, CancellationToken& cancel) at SHAutomation.Core.AutomationElements.SHAutomationElement.FindFirstDescendant(Func2 conditionFunc, TimeSpan timeout, Boolean waitUntilExists)

@ThomasPoucher ThomasPoucher added the bug Something isn't working label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant