HTML selects and the WebTest verifySelectField() method

View: New views
2 Messages — Rating Filter:   Alert me  

HTML selects and the WebTest verifySelectField() method

by Peter Ledbrook :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

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
engine is broken or something similar. Is this a known problem?

Thanks,

Peter
_______________________________________________
WebTest mailing list
WebTest@...
http://lists.canoo.com/mailman/listinfo/webtest

Re: HTML selects and the WebTest verifySelectField() method

by Marc Guillemot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

_______________________________________________
WebTest mailing list
WebTest@...
http://lists.canoo.com/mailman/listinfo/webtest
LightInTheBox - Buy quality products at wholesale price