Handle some runtime exceptions which appear during interaction with Telerik WPF based apps
aurax opened this issue · 2 comments
aurax commented
Two exceptions were observed:
- \src\FlaUInspect\Core\HoverMode.cs, line 43:
var hoveredElement = _automation.FromPoint(screenPos);
System.IO.FileNotFoundException
HResult=0x80070002
Message=The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
- \src\FlaUInspect\ViewModels\ElementViewModel.cs, line 298:
var foreColor = (int)pattern.DocumentRange.GetAttributeValue(TextAttributes.ForegroundColor);
System.InvalidCastException
HResult=0x80004002
Message=Specified cast is not valid.
Source=FlaUInspect
StackTrace:
at FlaUInspect.ViewModels.ElementViewModel.LoadDetails() in <FlaUInspect>\src\FlaUInspect\ViewModels\ElementViewModel.cs:line 298
aurax commented
I've made a fix for it.
Roemer commented
I now even made a better handling for the textpattern details.