Feature Request: Improve error/step messages


#1

Problem:
When looking at the steps or error messages, the locator can be a weird looking xpath or css.

I.waitForVisible("div[role="rowgroup"] .basic-table-row:nth-child(1)", 5)

or

element (.identification-numbers div:first-child) still not visible after 30 sec waiting for selector ".identification-numbers div:first-child" failed: timeout 30000ms exceeded

When the original script code looks like:

I.waitForVisible(p_po.x_container);

or

I.seeElement(x.identification_id);

Possible Solution
Create a mapping function that can be overriden by the user. Function takes the ‘locator’ and returns the desired display value. Default would be to return the locator value. This function will be used in error messages and step messages.

Most implementation of this function will just be map lookup. Locator --> Display. So we can offer that as well.

Would this be useful for anybody else?