Behat has a number of named selectors that make it easier to write readable and robust checks, for example:
When I click on "Preview" "link" in the "My first pattern match question" "table_row"
However, this list is currently fixed in core Moodle. Similar to
MDL-48024, it should be possible for all plugins to contribute named selectors, so one could write things like
When I click on "Reply" "link" in the "Hello world" "mod_forum/post"
(that naming convetion is just a suggestion, but we already assume that Behat tests authors know Frankenstyle component names, for the @mod_forum tags we expect them to to .feature files.)