Regression Testing Find In Page (Browser)
Written by Akkana Peck
Basic Text Find
Test pattern: Eerier Aardvarks three
spaces Three spaces.
Instructions
- Load this page, and without clicking in the content area (i.e. don't make a selection), bring up the Find dialog. Type "ar" and click Find. Expected: first "ar" in "Aardvarks". (If it matches something in the sidebar, that's okay, click Find until it gets to Aardvarks.)
- Hit return. Expected: second "ar" in "Aardvarks".
- Add two more r's (i.e. a r r r without the spaces).
Expected: Not found.
- Search for "s t" (type a single space between s and t). Expected: the end of "aardvarks", the spaces, and the first character of the first "three".
- Add two more spaces (i.e. type s<space><space><space> t in the search field). Search again. Expected: from end of first "spaces" through "T".
- Find again. Expected: Not found.
- Check Wrap around. Find again. Expected: end of "Aardvarks" to beginning of "three".
- Find again. Expected: from end of first "spaces" through "T".
- Check Match upper/lower case and find again. Expected: end of "Aardvarks" to beginning of "three".
- Uncheck Wrap around and find again. Expected: Not found.
- Add one more space (i.e. s<space><space> <space> <space>t). Uncheck Match upper/lower. Search again. Should return: Not found.
- Type "ee". Check Search backwards, and find again. Expected: Ee of Eerier.
- Highlight the last word in the sentence (second "spaces"). Find again. Expected: ee of Three.
- Check match upper/lower case. Find again. Expected:
"ee" of first "three".
- Find again. Expected: Not found.
- Uncheck Search backwards and Match upper/lower.
Skipped nodes
Test pattern:Here is a paragraph.
( Read More... |
Instructions
There are html comments, script tags, and noframes elements in the line above. This will test whether the find code skips the comments without skipping anything else.- Select the phrase "test pattern" above.
- Search foreward repeatedly for: nifty
Expected: should find only visible content, specifically the link text and the visible text generated by Javascript. If the selection disappears, that's an error and means that it found invisible content. - Check Search backwards and repeat the test.
Partial matches:
Test pattern:
AAabc<a>
abcdefgabcdefgh
Instructions
- Select the phrase "Test pattern" above.
- Search forward for: abc
Expected: should find the abc after AA, not jump to the one in the next line. - Search forward for: abcdefgh
(make sure you include the final 'h').
Expected: Should find the second block in the test pattern.
- Find again. Expected: pattern string in the list item above this one.
- Enable Search backwards. Find again. Expected: second block in test pattern.
- Find again. Expected: Not found.
- Uncheck Search Backwards.
Spanning table cells
Test pattern:P3 | P |
P3 | P |
P3 | P |
P3 | P |
Instructions
- Make a selection somewhere before the table.
- Search forward for "P3P". Expected: find the one in this line, not any of the text in the table.
- Click Search Backward.
- Click Find. Expected: Not Found.
Find in a More Complicated Page
Test pattern (select me now):moz
zilla
moz zilla
moz
illa
mozi | ll |
mo | zi |
ll | a |
mozilla.
Instructions
- Highlight "select me now".
- Search repeatedly for "mozilla" (all checkboxes off). Expected: It should find the three "mozillas" after the small tables, and the four on the lines with the form elements, and the one at the end, but nothing else.
- Check Search backwards and find repeatedly. Expected: same ("not found" after last find).
- Uncheck Search backwards.
Editor Find/Replace
Leave the Find dialog up. Click on this link and do the tests there:http://www.mozilla.org/quality/browser/front-end/testcases/composer/composer-find-replace.html
Where's Mozilla?
Instructions
Highlight something in this line, then search repeatedly for "mozilla" and make sure the selections all look reasonable (it should not find the "mozilla" string inside form elements). When you hit the end and get "Not found", enable Find backwards and search backward to this point, again making sure all selections seem reasonable.mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
moz
zilla
moz
zilla
moz zilla
moz
illa
moz
illamoz
illa
m
o
z
i
l
l
a
mozi | ll |
mo | zi |
ll | a |
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla