[Webtest] HTML selects and the WebTest verifySelectField() method

Peter Ledbrook Peter Ledbrook" <peter@cacoethes.co.uk
Tue, 1 Jul 2008 13:20:54 +0100


I'm currently using the WebTest 0.5 plugin for Grails and I'm finding
that not only does verifySelectField() always fail, I can't even do a
simple XPath verification like this:

  verifyXPath      (xpath:
"//select[@name='companyId']/option[3]/@value", text:

Note that I checked the XPath expression against the target page using
WebTest FF extension, and it evaluates to the expected value. In a web
test, though, it evaluates to an empty string. It seems that the XPath
engine is broken or something similar. Is this a known problem?