Manuel Jordan opened SPR-14774 and commented
Respecting the huge valuable work in Spring Framework.
With the best intentions for the 15.6.2 HtmlUnit Integration section. I want to know if is possible improve the sample about:
- MockMvc and HtmlUnit
- MockMvc and WebDriver
It working with and without Javascript.
I did a research on Google, and sadly practically there are no samples about these two options.
Perhaps if other Github examples would be added and referenced through the Reference documentation would be more valuable.
Thanks by your understanding
Affects: 4.3 GA, 4.3.3
Comment From: spring-projects-issues
Rossen Stoyanchev commented
The goal of that section is to describe Spring's integration with HtmlUnit. It's not the purpose to document HtmlUnit itself.
That said we do refer to JavaScript capabilities a coupe of times without even a small example. robwinch any recommendations? I found this for HtmlUnit which is too basic and this for WebDriver which doesn't go as far as connecting the dots like this blog post does. Or are there any existing samples to link to?
Comment From: spring-projects-issues
Rob Winch commented
I'm curious...What problems you are having? Without this information, I'm not sure how much we can help.
You can access the javascriptEnabled property of MockMvcHtmlUnitDriverBuilder to turn it off, but JavaScript is enabled by default. If you are not using it, having it enabled should not cause you any problems.
Comment From: spring-projects-issues
Manuel Jordan commented
Hello Rossen and Rob
I use a lot Spring MVC Test
to @Test
both MVC
and Rest
, the documentation about how to write the @Test
methods for both scenarios are well documented. I am able to create from the scratch my own @Test
methods using both Reference documentation
and GitHub
examples from your projects, how a guidance.
Sadly when I wrote this post, I was not able to find from both resources ( neither Reference documentation
nor GitHub
), the same approach about have available @Test
methods samples how a guidance for Spring Framework HTML Unit
, thus to know how through Spring Framework
through HTML Unit
how @Test
if a form has valid values, if JS
did work how is expected etc.
I hope my request be more clear now.
Thanks by your understanding.