dimanche 22 mai 2016

spring-framework htmlunitwebdriver testing doesn't support ajax post?

I think the spring-framework webdriver(MockMvcHtmlUnitDriver) testing doesn't support POST parameter passing(or encoding) correctly.

$.ajax(... { data : {'param1' : 'param1Val', 'param2' : 'param2Val' } ...)

then server expect the param values but the results are null. (even the content-type header is not set correctly. Always '/' not 'application/x-www-form-urlencoded')

How can I workaround this.

Aucun commentaire:

Enregistrer un commentaire