lundi 25 mai 2015

How to identify IWebElement

If I have an element, defined by some selector off By, is there a good way to identify it to a (test) user?

For example:

var element = driver.Find(By.CssSelector(".some .css"));

throw new SomeCustomTestingException(element);

What would be good properties to use so that the test output allows the user to identify the element?

e.g.

"Error with element with Css = something"
"Error with element on page MyPage with XPath"

Aucun commentaire:

Enregistrer un commentaire