getUrl not returning new Url after submitting form

Well, I find this a very basic issue, but I tried many things unsuccessfuly.

We have a form is inside /register html, and after POST request the web app goes to /register/success. Browser effectively shows the new page. However, it seems that WebUI.getUrl() does not change its response:



println(WebUI.getUrl()) // prints “/register”, it should be “/register/success”

assert WebUI.getUrl().contains(“success”) // fails

Any Idea? thanks