Reputation: 286
I'm trying to test a vaadin application with Selenium WebDriver
. The results of the WebDriverWait
was pretty random when executing the tests. Sometimes there are StaleElementExceptions
or the elements are not visible, wether they are or not.
So I added a JavaScript which gets the active status of the connected client. But still the same errors occured.
I then watched the application with FireBug
and saw, that for several buttonclicks the server sends up to three POST requests. I don't know anything about the implementation of the application, so my question is: "Is it normal for vaadin applications to send 'that much' POSTS for a single userinput?"
Upvotes: 0
Views: 114
Reputation: 1276
Vaadin uses POST requests to communicate interaction from client to server. There can be more than single POST from button click if there are other listeners registered on the page. These listeners can be for: blur, focus, poll, text change or other such events.
Easiest way to test Vaadin applications with Selenium based tool is to use Vaadin TestBench. If you use plain Selenium then you need to introduce waits or make a fork that can catch Vaadin POSTS so that it knows when response to button click has been received and handled by the server.
Upvotes: 1