evanmiller/ChicagoBoss — Issue #59: Comments not handled by boss_web_test:find_link_with_text
Author: graeme-defty
Created: 2012-01-15 16:13:04+00:00
State: open

find_link_with_text has two alternatives for stepping past unwanted tags:

find_link_with_text(LinkName, [{_OtherTag, _Attrs, []}|Rest]) ->
find_link_with_text(LinkName, Rest);

and

find_link_with_text(LinkName, [{_OtherTag, _Attrs, Children}|Rest]) when is_list(Children) ->
find_link_with_text(LinkName, Rest);

A third is needed to deal with comments (and possibly other tags that have no children?)

find_link_with_text(LinkName, [{_OtherTag, _Attrs}|Rest]) ->
find_link_with_text(LinkName, Rest);