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

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Tue, 08 Jul 2008 11:39:02 +0200


Hi Peter,

> 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:
> '${newCompanyId}')
> 
> 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

can you provide the html page on which your tests fail?

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com