Search code examples
seleniumrichfaces

Selenium fails to find component after dom update (reRender)


I'm testing a richfaces application with selenium. It works fine, unless I use reRender. (for those unfamiliar with richfaces - whenever an ajax request finished, parts of the DOM are updated/chagned/removed).

So, after a reRender selenium (the IDE at least) fails to locate the elements which were within the reRendered area. Both FireBug and WebDeveloper locate the elements, and on "view source" the elements are there.

So, is there a way to tell selenium to update its DOM "knowledge" with the latest changes?

Firefox 3.5.6, latest version of Selenium IDE.


Solution

  • I'm using Fifefox 3.6.8, Selenium IDE 1.0.7, and RichFaces 3.3.1, running on Ubuntu Linux. I don't have this problem.

    I have a simple form where the selection of a radio button triggers a reRender of an a:outputPanel. Initially, the panel is empty. If the right radio button is selected, the rendered condition is met, and the panel is rerendered with its children components. I am able to set a waitForCondition to look for an element id that will appear as a child of the panel, and I am able to verify the child elements after they appear. Selenium IDE correctly identifies these child elements when I right click in Firefox.