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

Find operation can throw invalid operation #54

Open
ThomasPoucher opened this issue May 16, 2022 · 0 comments
Open

Find operation can throw invalid operation #54

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

Comments

@ThomasPoucher
Copy link
Collaborator

Believe this is due to the cancellation token work where XPath is used and FindFirst is cancelled, leaving an object its retrieved in a different state

Additional context
: System.InvalidOperationException: Operation is not valid due to the current state of the object. at Interop.UIAutomationClient.IUIAutomationElement.FindFirst(TreeScope scope, IUIAutomationCondition 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 May 16, 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