I encourage you to use richfaces-selenium library (the API is moreless compatible to newly started project Arquillian Ajocado, so it will help you migrate to this new cool framework in future ;-)
Look for RequestTypeGuard in documentation link you have posted , I think it is what you are looking for.
RequestTypeGuard intercepts each XMLHttpRequest and waits for it's completion - it means it waits for end of COMPLETED phase of XHR request in which is rendering done - the solution was developed for testing of RichFaces itself. ;-)
thanks a lot!
I will check, if I can let inherit the super class for our Selenium-Tests from AbstractTestCase of richfaces-selenium after refactoring a bit.
BTW: I looked at initializeBrowser() with the @BeforeClass-Annotation in AbstractTestCase and saw that the selenium instance will be initialized every time there. What do you think is the best way, if I want a single initialization (+ login) for all my test classes (maybe in a test-suite) -- Overwrite initializeBrowser() in own super class for the tests (which holds e.g. something like a initialized-flag)?
1 of 1 people found this helpful
I discourage you to use single initialization point (like login before suite) - it makes tests to be not separated and fragile.
Say your test will make user session to fail and login user will not be able to reuse session that is already started.
It makes the rest of test suite to fail.
But if you will use the session-per-class principle as it is now, only one test class will fail.