this assert should be executed before the anchor is retrieved otherwise it serves no purpose; getAnchorByText will throw an exception if there is no link.