Improving failure message for specflow

This commit is contained in:
Sebastien Ros
2017-04-04 16:56:42 -07:00
parent 81e9a60661
commit 51f1499c86

View File

@@ -318,6 +318,10 @@ namespace Orchard.Specs.Bindings {
?? _doc.DocumentNode ?? _doc.DocumentNode
.SelectSingleNode(string.Format("//a[@title='{0}']", submitText)); .SelectSingleNode(string.Format("//a[@title='{0}']", submitText));
if (submit == null) {
throw new ArgumentException("Text not found: " + submitText);
}
urlPath = HttpUtility.HtmlDecode(submit.Attributes["href"].Value); urlPath = HttpUtility.HtmlDecode(submit.Attributes["href"].Value);
} }