Completed
Last Updated: 01 Oct 2013 13:44 by ADMIN
ADMIN
Mario
Created on: 22 Aug 2013 20:02
Type: Bug Report
0
Find.ByContent always returns null when arguments indicate partial match and FindContentType changed to InnerText
For example:

Find.ByContent<HtmlListItem>("p:some partial text", FindContentType.InnerText);

returns null even when element exists
Attached Files:
1 comment
ADMIN
Konstantin Petkov
Posted on: 27 Aug 2013 11:16
Hello,

This is a known limitation of the framework search algorithm, see here:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/html/search-control-type-by-partial-attributes-fails.aspx

In this case Find.ByContent(partial text) finds the first element matching the given criteria which is html:0. Trying to match the given element type fails so the end result is null. If you search by AllByContent you will get a number of elements instead, for example html, then title, then body, etc. See the attached project for reference.

I hope this helps!