Hi there,
I have the following problem:
TryFindSingle<T>("/element[@classname='ConnectUserControl']", out element) returns true (elemnt == null) but form.FindSingle<T>("/element[@classname='ConnectUserControl']") throws an exception (Ranorex.ElementNotFoundException: No element found for path '/element[@classname='ConnectUserControl']').
How is this possible?
Thank you for your help.
Greetings
Geci
TryFindSingle returns true and FindSingle throws exception
Re: TryFindSingle returns true and FindSingle throws exception
Update:
In some cases TryFindSingle(...) returns false, but the out parameter is not null... ???
=> FindSingle<Unknown>("/?/?/element[@classname='ConnectUserControl']") returns an Unknown object but TryFindSingle<Unknown>("/?/?/element[@classname='ConnectUserControl']", out element) returns false (elment != null).
The application is a wpf application.
In some cases TryFindSingle(...) returns false, but the out parameter is not null... ???
=> FindSingle<Unknown>("/?/?/element[@classname='ConnectUserControl']") returns an Unknown object but TryFindSingle<Unknown>("/?/?/element[@classname='ConnectUserControl']", out element) returns false (elment != null).
The application is a wpf application.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: TryFindSingle returns true and FindSingle throws exception
Which Ranorex version do you use?
Regards,
Alex
Ranorex Team
From the code of the current version (4.1.0), both cases are not possible. Are you 100% sure of your findings?Geci wrote:TryFindSingle<T>("/element[@classname='ConnectUserControl']", out element) returns true (elemnt == null)
...
In some cases TryFindSingle(...) returns false, but the out parameter is not null... ???
...
How is this possible?
Regards,
Alex
Ranorex Team
Re: TryFindSingle returns true and FindSingle throws exception
I'm so sorry. I had a bug in my test. I had forgotten a !... Again sorry. You are the best
Best regards
Geci
Best regards
Geci
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: TryFindSingle returns true and FindSingle throws exception
No problem, thanks for reporting back!
Regards,
Alex
Ranorex Team
Regards,
Alex
Ranorex Team